Hex color notation have an alpha channel

petermekhaeil

Peter Mekhaeil

Posted on June 1, 2022

Hex color notation have an alpha channel

The hex color notation can be described as #RGB[A] or #RRGGBB[AA] - it accepts an alpha channel that can be used to represent the transparency.

When using it as #RRGGBB[AA], the alpha channel is a hexadecimal number where 00 is full transparent and FF full opaque. If using the shorter #RGB[A] notation, it is a hexadecimal number ranging from 0 and F.

#FF7f00     /* orange               */
#FF7f0000   /* orange    0% opaque  */
#FF7f0080   /* orange   50% opaque  */
#FF7f00FF   /* orange  100% opaque  */

#01E        /* blue                 */
#01E0       /* blue       0% opaque */
#01E8       /* blue      53% opaque */
#01EF       /* blue     100% opaque */
Enter fullscreen mode Exit fullscreen mode

You can find out more on MDN.

Today I Learned
I share what I learn on Today I Learned.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
petermekhaeil
Peter Mekhaeil

Posted on June 1, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Today I learned: HTML and CSS
todayilearned Today I learned: HTML and CSS

May 21, 2024

Fitness website with HTML CSS
todayilearned Fitness website with HTML CSS

February 3, 2022

How to make text responsive
beginners How to make text responsive

January 26, 2022

ยฉ TheLazy.dev

About