peephole optimizations to toHSL() favoring integer operations and comparisons