This looks really neat. The demo uses a lot of shell pipes though, needing to type "pastel" out for every processing step. It would be convenient if something like
pastel random | pastel mix red | pastel lighten 0.2 | pastel format hex
could be written
pastel random mix red lighten 0.2 format hex
(not quite possible, I think) or
pastel random then mix red then lighten 0.2 then format hex
GStreamer uses the argument "!" as a pseudo-"|" so you can build multimedia pipelines without actually using Unix pipelines, or repeating the gst-launch command:
Having written a large number of CLIs in the past, I've often come across this issue but never had a good solution. This is remarkably simple, elegant, and easily generalized into a CLI framework so it can be implemented with ease. Thank you for sharing this nugget of gold!
Literally last week I was looking for a tool to grep colors from a text file (say an SVG or a theme file) and was about to start writing one...which wasn't going to be even half as neat as this, so thank you very much for sharing
I had to create some diagrams and needed a way to generate palettes programatically, this will come in handy since I can iterate over HSL space and convert back to RGB since the diagram tool only accepts RGB! If the OP is the author please send the info, let me pay you a beer ;)
I was just looking for something that could print hex color codes to the terminal the other day. The best solution I found was some hacky perl script which was hit-or-miss with certain colors, for some odd reason. Much appreciated.
FWIW, Linuxbrew is shaping up to be a solid tool as well.
Want to install your favorite text editor on a server and don't have root? Need a CLI utility and your sysadmin is slow/lazy? System package is ancient and you need a newer version? Linuxbrew solves all of those problems.
Heck, you could even rig up a shell script to toggle among Brew installations in order to create self-contained dev environments, synchronize with a Brewfile, and generate a Brewfile.lock.
I was looking for a quick way to convert RGB 0-255 to RGB float 0.0-1.0 (often used in shaders and other areas of 3D programming) just the other day. This tool doesn't currently seem to support that, would be a nice addition.