HSL values are converted to hexadecimal RGB values before being transferred to the system. Before the device, you can copy any received RGB value that is outside the "device gamut" - the range of colors that can be displayed - up to the displayed value. RGB values are indicated in hexadecimal. This is a specific algorithm for browsers to convert HSL values to RGB values. Rounding behavior is not specified by the standard - and there are many ways to round it off, because there is no built-in rounding function in C or C ++.
HOW TO RETURN hsl.to.rgb(h, s, l): SELECT: l<=0.5: PUT l*(s+1) IN m2 ELSE: PUT l+sl*s IN m2 PUT l*2-m2 IN m1 PUT hue.to.rgb(m1, m2, h+1/3) IN r PUT hue.to.rgb(m1, m2, h ) IN g PUT hue.to.rgb(m1, m2, h-1/3) IN b RETURN (r, g, b)
Of the proposed recommendation
In other words, you should be able to represent the same range of colors in HSLA, as you can imagine in RGB using fractional values for HSLA.
source share