sharkdp / pastel

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

Feature: make `pastel gradient` accept more than two colors #117

Closed bbkane closed 4 years ago

bbkane commented 4 years ago

Feature

It'd be fun for me if pastel gradient would accept more than two colors and generate the gradient between them.

For example, I can generate a gradient between white, green, and red with the following:

cat <(pastel gradient white green) <(pastel gradient green red | sed 1d)

I'd like to generate it with:

pastel gradient white green red

Use Case

I'm using pastel for my shell prompt ( https://github.com/bbkane/dotfiles/tree/master/zsh#install-prompt ) and this would make it even more ~distracting~ interesting.

Potential Problems

Not sure the best way to deal with weird -n options:

pastel gradient -n 2 white green red   # what does this do? Throw an error?

Thanks for pastel!

sharkdp commented 4 years ago

This is supported in the latest version: https://github.com/sharkdp/pastel/releases/tag/v0.7.0

bbkane commented 4 years ago

Oh great, thank you!