R=252, G=254, B=214 converted to HSB is H=63, S=0,952381, B=0,9176471
'This is a fact I know (I got the values from the same pixel)
(pixel.R pixel.G pixel.B) and (pixel.GetHue, pixel.GetSaturation, pixel.GetBrightness)
B is sometimes called V (value) or L(luminance) I guess... anyway.
Now here is my function and some code:
Private Declare Function ColorHLSToRGB Lib "SHLWAPI.DLL" _
(ByVal wHue As Integer, ByVal wLuminance As Integer, ByVal wSaturation As Integer) As Long
Dim nColor as Long
Dim nRed,nGreen,nBlue as Integer
nColor = ColorHLSToRGB(63, 0.9176471, 0.952381)
nRed = nColor And 255
nGreen = (nColor / 256) And 255
nBlue = (nColor / 65536) And 255
Me.Text = CStr(nRed) + " " + CStr(nGreen) + " " + CStr(nBlue)
Why it is giving me a wrong result(1 1 1) instead of (252 254 214) please help this is doing my head in.