Colors set using rgb(#, #, #) in the properties pane are not correct

This is because it splits the string on the commas and then tries to interpret each word as a number, in this case “rgb(52”, “152” and “219)”. When it is interpreting each word, it reads all numerical characters of the word until it reaches a non-numerical character (or it results in 0 if no leading characters are numeric at all).

“rgb(52” does not contain any leading numerical characters => 0
“152” => 152
“219)” contains three leading numerical characters => 219

It doesn’t actually interpret this string as three values enclosed in an “rgb(…)”. It’s just a side effect of how it’s being parsed.

1 Like