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 or something.
GStreamer uses the argument "!" as a pseudo-"|" so you can build multimedia pipelines without actually using Unix pipelines, or repeating the gst-launch command: https://gstreamer.freedesktop.org/documentation/tutorials/ba...
Pastel: A command-line tool to generate, analyze, convert and manipulate colors
21–30 of 30 posts
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#22I do a fair bit of viz work, this tool could come in handy for generating color schemes I think.
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#23For us Macheads it looks like there's a brew formula in the works: https://github.com/Homebrew/homebrew-core/pull/43459 I do a fair bit of viz work, this tool could come in handy for generating color schemes I think.
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4e60ba14762ad17eef498ce5719aa06bc639d2b1/Formula/pastel.rbRe: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#24For us Macheads it looks like there's a brew formula in the works: https://github.com/Homebrew/homebrew-core/pull/43459 I do a fair bit of viz work, this tool could come in handy for generating color schemes I think.
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.
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#25Earlier quoted context omitted.
GStreamer uses the argument "!" as a pseudo-"|" so you can build multimedia pipelines without actually using Unix pipelines, or repeating the gst-launch command: https://gstreamer.freedesktop.org/documentation/tutorials/ba...
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!
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#26Earlier quoted context omitted.
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!
Sadly Zsh uses ! for history expansion so they'd all have to be escaped in that shell.
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#27Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#28I 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.
Thank you for the feedback. I have added a new "rgb-float" format in the latest release: https://github.com/sharkdp/pastel/releases/tag/v0.5.3
Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors
#29Earlier quoted context omitted.
GStreamer uses the argument "!" as a pseudo-"|" so you can build multimedia pipelines without actually using Unix pipelines, or repeating the gst-launch command: https://gstreamer.freedesktop.org/documentation/tutorials/ba...
That would be great. pastel random ! mix red ! lighten 0.2 ! format hex