SFML community forums
General => Feature requests => Topic started by: Cuban-Pete on July 10, 2011, 09:18:36 pm
-
I would like to have the ability to change RGB to HTML (hex) and back to RGB again. But what I would really like is RGB to HSL and back to RGB again. :)
//edit: Why HSL? Because than I can do color overlay effects like in Gimp.
-
I think that a custom function would be the best...
http://www.deadbeef.com/converting_rgb_to_hsv_in_c/
http://serennu.com/colour/rgbtohsl.php
http://130.113.54.154/~monger/hsl-rgb.html
-
What would also be nice is an operator on colors. For example that I do this:
sf::Color test(20,20,20);
test = test * 1.5;
and we get a brighter test color. :)
-
I think that a custom function would be the best...
http://www.deadbeef.com/converting_rgb_to_hsv_in_c/
http://serennu.com/colour/rgbtohsl.php
http://130.113.54.154/~monger/hsl-rgb.html
If SFML won't support it, do you perhaps have the c++ code for that (RGB <-> HSL)? I tried google, but got strange C# stuff...
-
So no HSL<->RGB convertion function?