Open nkh opened 3 years ago
You could use the -f
(--force-color
) mode in your last pastel
call and pipe to xargs echo
. For example:
pastel distinct 12 | pastel sort | pastel -f format hex | xargs echo
or:
pastel list | pastel sort-by hue | pastel -f format name | xargs echo
is there a way to sort by hue and luminosity?
Yes. Check out pastel sort-by --help
.
I did but I see nothing there that tell me how to sort by Hue AND Brightness, trying to give both is an error and piping the first in the second doesn't sort on both criteria.
sorting on Hue gives, ie: dimgray, gainsboro, gray, lightgray
what does it mean to sort by "Hue AND Brightness"? Do you mean: Sort "by Hue, THEN by Brightness"? I.e.: For colors where the hue is exactly the same, sort by brightness?
an example explains better, if you look at the colors I listed in that order (given by sort-by hue) above do they look sorted to you?
Well. These colors all have a hue of zero:
▶ pastel format hsl-hue dimgray gainsboro gray lightgray
0
0
0
0
I agree, they don't look sorted, as the brightness goes up and down. So indeed, it would be useful to have a second (lower priority) sort order for the sort
subcommand. Let's turn this into a feature request :+1:
sorting color generate a large output which makes it difficult to compare the colors to each other, the possibility to sort colors and present them in one line would be very welcome