Technology News

Using Different Color Spaces for Non-Boring Gradients

A little gradient generator tool from Tom Quinonero. You’d think fading one color to another would be an obvious, simple, solved problem — it’s actually anything but!

Tom’s generator does two things that help make a gradient better:

  1. You can pick an “interpolation space.” Gradients that use the sRGB color space (pretty much all the color stuff we have in CSS today) have a bad habit of going through a gray dead zone, and if you interpolate the gradient in another color space, it can turn out nicer (and yet convert it back to RGB to use today).
  2. Easing the colors, though the use of multiple color-stops, which can result in a less abrupt and more pleasing look.

Showing a color wheel with a line indicating the two colors in a gradient that goes from yellow to light blue. The resulting gradient is at top showing some gray tones as a result of the color space.

See the gray in the middle there?

Different gradient apps with different color spaces

Josh has another similar app, as does Erik Kennedy. So stinkin’ interesting how different gradients are in different color spaces. Think of the color spaces as a physical map where individual colors are points on the map. Gradients are dumb. They just walk straight from one point on the map to the next. The colors underneath their feet as they walk make a massive difference in how the gradient turns out.

Direct Link →

CSS Scroll Snap Slide Deck That Supports Live Coding
The most outspoken Trump supporter in Silicon Valley is leaving Facebook’s board

Related Articles

Can I :has()

Exploring the Potential of the Metaverse: A New World Awaits
As you might know, my company (Igalia) works on all of the web engines and we contribute a lot. I’m very proud of all of the things we’re able to…

Real estate has gone meta

real-estate-has-gone-meta
The metaverse is getting hotter. Not hot, like a delicious meal or a Finnish sauna. This mostly fictional, virtual world is getting hot like a real estate market. Because lately,…

Build a Website with React and Tailwind CSS

Exploring the Potential of the Metaverse: A New World Awaits
This tutorial shows how to create a product website using React and Tailwind CSS. We’ll cover how to set up React with Tailwind CSS using Create React App Configuration Override…

Amazon’s Ring privacy problem is back

Amazon’s Ring privacy problem is back
Despite what you might think (or were told), your Amazon Ring camera might be giving video data to police without your knowledge or consent. Massachusetts Sen. Ed Markey revealed on…