CSS has a whole slew of different color formats: hex codes, rgb(), hsl(), lch(), the list goes on!
Which one should we use? It might seem like an inconsequential decision, but there are some pretty important differences between them. And, honestly, I think most of us are prioritizing the wrong things. 😅
In this tutorial, I'll take you on a tour of the different options. We'll see how they work, how we can decipher them, and how we can use them to our advantage. Later, I'll show you how modern CSS lets us make on-the-fly adjustments, if we pick the right color format.
Link to this headingNamed colors
So, this isn't really a color format, but it's a good place to start!
HTML comes with 140 named colors. These are special keyword values like dodgerblue, hotpink, and tomato:
Code Playground
Result