views:

105

answers:

3

in colordialog why are these values the max values? to what do they correspond?

A: 

The max values are slightly crunched to accommodate HDTV blacker blacks (etc).

A: 

The correspond to the maximum values in the scale of HSV :). 240 is divisible 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 doing colour palettes than 256.

239 will be because 240 is exactly the same as 0 (as it's a circle).

Stephen
+4  A: 

"In Windows, the HSL and HSV spaces are usually remapped to a scale between 0 to 240 so that colors can be represented with a 32-bit value."

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

Hue is expressed as an angle around the color wheel, in this case multiplied by 2/3 to stay under 240 degrees. The highest value is 239 because 240 = 0 just as 360 degrees = 0 degrees on a compass.

RightFullRudder