Why are the maximum values ​​for saturation and hue of 240 and 239, respectively?

In ColorDialog, why are the maximum values ​​for saturation and hue 240 and 239 respectively? What do they correspond to?

+4
source share
3 answers

"On Windows, HSL and HSV spaces are usually reassigned on a scale from 0 to 240, so colors can be represented with a 32-bit value.

See http://msdn.microsoft.com/en-us/library/aa511283.aspx

Hue is expressed as the angle around the color wheel, in which case it is multiplied by 2/3 to stay at 240 degrees. The highest value is 239, because 240 = 0 is the same as 360 degrees = 0 degrees on the compass.

+5
source

Maximum values ​​are slightly distorted to accommodate black drafts of HDTV (etc.).

0
source

They correspond to the maximum values ​​on the HSV scale :). 240 is divided by 2,3,4,5,6,8,10,12,15,16,20,24,30,40,60,80,120, etc. (Did I miss any?). Much more versatile for color palettes than 256.

239 will be because 240 exactly matches 0 (like a circle).

0
source

All Articles