Fin Moorhouse Profile picture
Jul 3, 2022 10 tweets 3 min read Read on X
Some gradients between two colours look good, others suck. It's easy to tell the difference, but what *is* that difference? Image
I think @JoshWComeau has figured it out! Here's the thought: gradients trace a line between two points in colour space, but there's more than one way to represent colours in a (typically 3D) space.
One way to pick out a colour is by specifying how much red, green, and blue it contains. These are RGB colour spaces.

Second pic is my phone screen under a microscope, which uses this idea of adding together R, G, and B
Another way to pick out a colour is by specifying its 'hue' (where on the colour wheel?), its saturation (how pastel vs colourful?), and its 'value' (how bright?). These are 'HSV' or 'HSB' colour spaces.
Josh's idea is that attractive-looking colour gradients are linear gradients in HSV-type colour spaces, and other gradients are unattractive because they trace a straight line through RGB-type spaces.
This is because bad-looking gradients typically have a greyish bit between the two colours, while attractive gradients are colourful throughout (see above).
If you imagine the RGB cube, there is a channel of greyish colours running between the "all 0%" corner and the "all 100%" corner. Two colours with significantly different hues are going to have to pass through that channel.
In HSV space, two colours with significantly different hues avoid that grey zone by orbiting around it, remaining colourful.

Notice that just varying the hue to get between two colours of similar S and V means circling around vs cutting through the colour wheel.
Here are two slices of the HSV cylinder for colours of the same value (~brightness).

The linear gradient in RGB space is on the left, the linear gradient in HSV space is on the right.
Here's @JoshWComeau's excellent article where I got this from: joshwcomeau.com/css/make-beaut…

I thought it was a very neat point! 🎨

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Fin Moorhouse

Fin Moorhouse Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @finmoorhouse

Jan 7
A puzzle:

Imagine you begin a journey in Seattle WA, facing exactly due east. Then start traveling forward, in a straight line along the Earth's surface. Image
You will travel across North America, and onto the Atlantic Ocean. Eventually, you will hit another country.

What is the first country you hit?
⚠️ Answer below — last chance to make your own guess ⚠️
Read 15 tweets
Jul 1, 2023
A memorably insane detail from 'The Doomsday Machine' by the late Daniel Ellsberg:

In 1960, the US Air Force would sometimes task the RAND Corporation with assessing new technical proposals. One memo titled "Project Retro" fell to Ellsberg to assess.
The scheme, which had already passed through multiple agencies without being discarded, was prompted by the worry that a surprise Soviet attack with ICBMs could incapacitate US land-based missiles before they could retaliate.
Ellsberg: "[it] proposed in some detail to assemble a huge rectangular array of one thousand first-stage Atlas engines—our largest rocket[s]—to be fastened securely to the earth in a horizontal position, facing in a direction opposite to the rotation of the earth...
Read 6 tweets
Jun 30, 2022
Here's a way of visualising a Bayesian update —

You start with a sample space S, and a prior about the likelihood of H. You can think of learning new evidence like placing a smaller frame somewhere inside of S. Image
The dots ":" are there because if you write in the areas of the left and right sides, you get the fractional odds. In this example we go from about 2:1 to about 1:3 (from the bigger to the smaller rectangle)
Areas stand for probabilities: you thought that H was less likely than not before you placed the smaller frame, and now it looks more likely.
Read 5 tweets
Jun 9, 2022
Should settling Mars be a current priority for longtermists? I think no, not by a long shot! (Let’s instead focus on preventing pandemics, decarbonising, making sure AGI doesn’t go terribly...)

Here’s why:
The most compelling argument for travelling to Mars soon is that it’s a hedge against extinction on Earth. Launching some of our eggs into a different basket.

I agree that preventing anything as irreversible as extinction is hugely important!
But on these grounds the Mars strategy looks far less promising than other potential priorities: it’ll likely be hugely expensive for the risk it could reasonably hedge against, and (as far as I can tell) it probably wouldn’t protect against the most concerning risks.
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(