How To Use CSS Hex Code Colors with Alpha Values | DigitalOcean
About
Read on Omnivore
Read Original
Learn how to use hex codes in CSS and change the transparency of the color by using an alpha value. An introduction to hexadecimal numbers is included, too.
This page is powered by Omnivore ‐ you can read more about how I use Omnivore here: Omnivore - Saving Articles for Citations in Obsidian.
Highlights
Adding an Alpha Value to CSS Hex Codes
Using an alpha value to update a color’s transparency will change the hex code format from
#RRGGBB
to#RRGGBBAA
(where alpha isA
). The first six values (the red, green, and blue ones) remain the same.The
AA
value in#RRGGBBAA
can range from the lowest value possible (00
) to the highest value possible (FF
). Lowering the value will cause the visibility to become fainter and fainter until it becomes transparent. Raising the value will cause the visibility to become more and more opaque. ⤴️
All default callouts in Quartz use 10
for --bg
(background) colour alpha, making it nearly completely transparent.