Breaking out common parts of HSL->RGB conversion.