Sorting by Color

前端 未结 3 663
無奈伤痛
無奈伤痛 2021-01-31 04:23

I have a long list (1000+) of hex colors broken up in general color categories (Red, Orange, Blue, etc). When I show the list of colors in each category I need to show them in

3条回答
  •  心在旅途
    2021-01-31 05:01

    Convert the colors from RGB to a HSV or HSL scale and then sort them by Value or Lightness. Lightness might work better as it would capture the "faded" colors better, such as pink->red->dark red.

提交回复
热议问题