ID:158463
 
How do i make that color selector that is similar to the paint one , used in dbz finale and many other games.
var/color = input("Choose a color","Color Selection")as color
//"input()as color" returns a color in the form of #RRGGBB.
In response to Kaiochao
                        var/color = input("Choose a color","Color Selection")as color
usr.red=color
S.overlays+='aaa.dmi'+rgb(usr.red)

i dont know how to make rgb work with vars, red is the color var, i made it cause i want to store the color the usr choosed, but the rgb does not recognize it is html, it thinks it is R,G,B... what should i do?
In response to Karffebon
You'll want to use the Blend() proc, like so:

var/icon/I = icon('xyz.dmi')
var/color = input() as color
I.Blend(color,ICON_MULTIPLY)


Note that I'm using ICON_MULTIPLY there. It works much better than adding RGB values, though your original image must be made properly (black stays black, white becomes the selected color, anything in between is a darker version of the selected color).