Hex representation of a color with alpha channel?

Patrick Klug picture Patrick Klug · Sep 14, 2009 · Viewed 93.5k times · Source

Is there a W3 or any other noteworthy standard on how to represent a color (including alpha channel) in hex format?

Is it #RGBA or #ARGB?

Answer

guitarranalon picture guitarranalon · Nov 7, 2012

It looks like there is no hex alpha format: http://www.w3.org/TR/css3-color/

Anyway, if you use a CSS preprocessor like SASS then you can pass an hex to rgba: background:

rgba(#000, 0.5);

And the preprocessor just converts the hex code to rgb automatically.