fix bug in color selection

fix bug in formula to determine current distance from darkest hour