sharkdp / pastel

A command-line tool to generate, analyze, convert and manipulate colors
Apache License 2.0
4.98k stars 97 forks source link

Rotate in La*b* space #152

Open StyXman opened 2 years ago

StyXman commented 2 years ago

What says on the tin. Very useful when trying to find colors of the same Luminance.

sharkdp commented 2 years ago

I agree, that should be supported. Note that this might result in colors outside of the sRGB gamut though. We need a general strategy on how to handle such scenarios.

Note that you can already do this with some scripting. You can first extract the current LCh hue with

hue=$(pastel format lch-hue "$color")

and then set the rotated hue with

pastel set lch-hue "$new_hue"

Unfortunately, I just noticed that lch-hue can not be set yet either.