ID:264987
 
Code:
    Scarf
name = "Scarf"
icon = 'Scarf.dmi'
DblClick()
if(usr.Base =="Hollow")
usr.overlays -= src.Scarf
return alert("Cant Wear")
if(src.worn)
src.worn = 0
usr.overlays -= src.Scarf
else
src.worn = 1
var/cred = input("How much red do you want?") as num
var/cgreen = input("How much green do you want?") as num
var/cblue = input("How much blue do you want?") as num
src.Aurar = cred
if(src.Aurar >=130)
Aurar = 130
src.Aurag = cgreen
if(src.Aurag >=130)
Aurag = 130
src.Aurab = cblue
if(src.Aurab >=130)
Aurab = 130
src.icon += rgb(src.Aurar,src.Aurag,src.Aurab)
usr.overlays += src.Scarf


Problem description:

lets say i make the color rgb(100,0,0)then when i stop wearing it and the overlY goes away and then i put it back on and add color to it the again the previous color mix with the new color
Subtract rgb(255,255,255) (Essentially, you are removing all light from the object)
initial() is a good proc to use in a case like this. Before you add the color to the current icon, you want to reset the icon to its initial value.
icon = initial(icon)