Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
531 views
in Technique[技术] by (71.8m points)

standards - Hex representation of a color with alpha channel?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...