FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
RGB, HSL, HEX, and OKLCH: Why There Are So Many Color Formats and When to Use Each
How-ToMachine Learning

RGB, HSL, HEX, and OKLCH: Why There Are So Many Color Formats and When to Use Each

via Dev.to TutorialMichael Lip2h ago

I once spent twenty minutes trying to make a color 20% lighter. The original color was #3498DB (a medium blue). I tried adding 20% to each RGB channel: 52+51=103, 152+51=203, 219+51=255. The result, #67CBFF, was lighter but also more saturated and shifted slightly toward cyan. What I wanted was the same blue, just lighter. I was modifying the wrong color model for the job. Different color formats exist because they describe color from different perspectives, and some perspectives make certain operations trivial that are nightmarish in others. RGB: how screens see color RGB (Red, Green, Blue) describes color by how much of each light primary to emit. It maps directly to hardware: every pixel on your screen is a cluster of red, green, and blue subpixels. color : rgb ( 52 , 152 , 219 ); /* functional notation */ color : #3498 DB ; /* hex notation (same color) */ color : rgb ( 20 . 4 % 59 . 6 % 85 . 9 %); /* percentage notation */ Hex notation is just RGB in base-16. #3498DB breaks down as

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
0 views

Related Articles

Your CLAUDE.md Is a Suggestion. Hooks Make It Law.
How-To

Your CLAUDE.md Is a Suggestion. Hooks Make It Law.

Medium Programming • 1h ago

The Hidden Complexity of Citation Formatting (And Why I Automated It)
How-To

The Hidden Complexity of Citation Formatting (And Why I Automated It)

Dev.to Beginners • 2h ago

The Widmark Formula: How BAC Is Actually Calculated
How-To

The Widmark Formula: How BAC Is Actually Calculated

Dev.to Tutorial • 2h ago

Three Ways to Talk to Claude Remotely When You’re Not at Your Desk
How-To

Three Ways to Talk to Claude Remotely When You’re Not at Your Desk

Medium Programming • 2h ago

The Anatomy of a Good Box Shadow (and Why Most Look Fake)
How-To

The Anatomy of a Good Box Shadow (and Why Most Look Fake)

Dev.to Tutorial • 3h ago

Discover More Articles