Alpha hex support
See original GitHub issue#697 proposes single and double character hex color support (eg: #E
would convert to #EEEEEE
).
In the spirit of this, I’m proposing support for alpha hex support.
#FF000080
The extra two hex digits at the end would represent the alpha/opacity. LESS could convert this to:
rgba(255, 0, 0, 0.5)
Producing a pure red with 50% opacity.
Issue Analytics
- State:
- Created 11 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
"alpha hexadecimal" | Can I use... Support tables for HTML5 ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >How To Use CSS Hex Code Colors with Alpha Values
Learn how to use hex codes in CSS and change the transparency of the color by using an alpha value. An introduction to...
Read more >Alpha Channel Support for CSS Hex Syntax Sample
Sample illustrating the use of Alpha Channel Support for CSS Hex Syntax. ... Starting with Chrome 52, hex color values can include an...
Read more >Hexadecimal color code for transparency - gists · GitHub
Transparency is controlled by the alpha channel (AA in #AARRGGBB). Maximal value (255 dec, FF hex) means fully opaque. Minimum value (0 dec,...
Read more >Browser Compatibility Testing of #rrggbbaa hex color notation
BROWSER SUPPORT FOR #RRGGBBAA HEX COLOR NOTATION. Google Chrome. #rrggbbaa hex color notation element is not supported by Chrome version 4 to 51....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can this be reopened bearing in mind 4 and 8-digit hex are defined in CSS Color Module Level 4 and already supported in various browsers?
I don’t know when it happened, but at some point
rgba()
became able to convert#rrggbbaa
colors torgba()
.Example:
box-shadow: 0 3px 6px rgba(#00000029);
will output asbox-shadow: 0 3px 6px rgba(0, 0, 0, 0.16078431);
It isn’t documented but it should be, so I did so in this pull request.