Fix #1018 properly, make sure the colour values are brought into 0-255 range and rounded.

Originally committed to SVN as r5354.
This commit is contained in:
Niels Martin Hansen 2011-02-22 00:54:20 +00:00
parent c0cf0c6a06
commit 27839f92ac
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ function HSL_to_RGB(H, S, L)
end
return r, g, b
return math.floor(r*255+0.5), math.floor(g*255+0.5), math.floor(b*255+0.5)
end
-- Removes spaces at the start and end of string