René Ullrich
Agreed. My code for conversion
Function of_torgb(value string as_value, ref long al_red, ref long al_green, ref long al_blue)
Long al_value
al_value = of_tolong(as_value)
al_blue = al_value / 65536
al_value = Mod (al_value, 65536)
al_green = al_value / 256
al_red = Mod (al_value, 256)
Return
Function of_tolong(value string as_hex)
String ls_hex
Integer li_loop,li_length
Long ll_result = 0
li_length = len(as_hex)
ls_hex = Upper(as_hex)
FOR li_loop = 1 to li_length
ll_result += ( Pos ( '123456789ABCDEF', mid ( ls_hex, li_loop, 1 ) ) * &
( 16 ^ ( li_length - li_loop ) ) )
NEXT
RETURN ll_result
1. For #C8D3DF, I get RGB(223, 211, 200) from the above code, but the site https://www.rapidtables.com/convert/color/hex-to-rgb.html give RGB(200, 211, 223). Which one is correct?
2. Setting background color for Window & StaticText object gives two different colors for values #C8D3DF and RGB(223, 211, 200) or 13161439. Why ?
Probably somewhere either the code is wrong and the website link is wrong in the conversion. And / Or the color settings in Powerbuilder for window and static field may also be wrong.