Live data from Hacker News

Pastel: A command-line tool to generate, analyze, convert and manipulate colors

github.com

11–20 of 30 posts

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#12
post #11

3 days ago: https://news.ycombinator.com/item?id=20798453

No comments though, and very few up votes.

From the FAQ (see footer):

"Are reposts ok?

If a story has had significant attention in the last year or so, we kill reposts as duplicates. If not, a small number of reposts is ok."

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#13
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.

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#15
post #13

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...

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#16

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.

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

#17
post #15
post #13

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...

That would be great.

  pastel random ! mix red ! lighten 0.2 ! format hex

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#18
post #13

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.

Every shell can make its own version, but here's a wrapper in fish which I named pstl:

  eval (echo "pastel $argv" | sed 's/ | / | pastel /g')
Now you can

  pstl "random | mix red | lighten 0.2 | format hex"

Re: Pastel: A command-line tool to generate, analyze, convert and manipulate colors

#20
post #12
post #11

3 days ago: https://news.ycombinator.com/item?id=20798453

No comments though, and very few up votes. From the FAQ (see footer): "Are reposts ok? If a story has had significant attention in the last year or so, we kill reposts as duplicates. If not, a small number of reposts is ok."

TIL. I'll keep that in mind for my submitions.

Thanks!

Post reply on HN