Area color average algorithm working now