Hex colors: Numeric representation for "transparent"?
Posted
by Pekka
on Stack Overflow
See other posts from Stack Overflow
or by Pekka
Published on 2009-11-17T19:42:45Z
Indexed on
2010/04/04
18:13 UTC
Read the original article
Hit count: 581
I am building a web CMS in which the user can choose colours for certain site elements. I would like to convert all colour values to hex to avoid any further formatting hassle ("rgb(x,y,z)" or named colours). I have found a good JS library for that.
The only thing that I can't get into hex is "transparent". I need this when explicitly declaring an element as transparent, which in my experience can be different from not defining any value at all.
Does anybody know whether this can be turned into some numeric form? Will I have to set up all processing instances to accept hex values or "transparent"? I can't think of any other way.
© Stack Overflow or respective owner