' 撰寫人:Devil(璉璉) E-Mail: qvb3377@ms5.hinet.net 僅供學術測試使用,引用請註明原出處 ' -------------------------------------------------------------------------------------- Public Declare Sub ColorRGBToHLS Lib "shlwapi" (ByVal clrRGB As Long, pwHue As Long, pwLuminance As Long, pwSaturation As Long) Public Declare Function ColorHLSToRGB Lib "shlwapi" (ByVal pwHue As Long, ByVal pwLuminance As Long, ByVal pwSaturation As Long) As Long Public Function GetRValue(ByVal RGBColor As Long) As Long GetRValue = RGBColor Mod 256 End Function Public Function GetGValue(ByVal RGBColor As Long) As Long GetGValue = (RGBColor \ 256) Mod 256 End Function Public Function GetBValue(ByVal RGBColor As Long) As Long GetBValue = RGBColor \ 65536 End Function