How To Use CSS Hex Code Colors with Alpha Values | DigitalOcean

About

#Omnivore

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

Using an alpha value to update a color’s transparency will change the hex code format from #RRGGBB to #RRGGBBAA (where alpha is A). 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.