Skip to main content
retag
Link
lmlmlm
  • 29.6k
  • 14
  • 53
  • 106
Tweeted twitter.com/StackDesign/status/823984085685170178
Source Link
Ben Packard
  • 283
  • 1
  • 2
  • 6

Generating a series of colors between two colors

Given a start color and an end color, is it possible to algorithmically generate a range of colors between them? For example, given the light and dark shades of blue/gray at the start and end of the image below, how might I generate the intermediate shades?

enter image description here

One possible solution I am considering is to create a gradient from the two colors and then sample the color at equidistant points along that gradient. Is that likely to be the best approach?