๐Ÿ“ฆ sharkdp / pastel

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

โ˜… 6.2k stars โ‘‚ 123 forks ๐Ÿ‘ 6.2k watching โš–๏ธ Apache License 2.0
clicolor-convertercolor-spacecolorscommand-linerustterminaltool
๐Ÿ“ฅ Clone https://github.com/sharkdp/pastel.git
HTTPS git clone https://github.com/sharkdp/pastel.git
SSH git clone git@github.com:sharkdp/pastel.git
CLI gh repo clone sharkdp/pastel
dependabot[bot] dependabot[bot] Bump regex from 1.11.3 to 1.12.2 b60e899 2 months ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ benches
๐Ÿ“ doc
๐Ÿ“ src
๐Ÿ“ tests
๐Ÿ“„ .gitignore
๐Ÿ“„ build.rs
๐Ÿ“„ Cargo.lock
๐Ÿ“„ Cargo.toml
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ LICENSE-APACHE
๐Ÿ“„ LICENSE-MIT
๐Ÿ“„ README.md
๐Ÿ“„ README.md

pastel

Build Status

pastel is a command-line tool to generate, analyze, convert and manipulate colors. It supports many different color formats and color spaces like RGB (sRGB), HSL, CIELAB, CIELCh as well as ANSI 8-bit and 24-bit representations.

In action

pastel in action

Tutorial

Getting help

pastel provides a number of commands like saturate, mix or paint. To see a complete list, you can simply run `` bash pastel %%CODEBLOCK0%% bash pastel random | pastel mix red | pastel lighten 0.2 | pastel format hex %%CODEBLOCK1%% lightslategray '#778899' 778899 789 'rgb(119, 136, 153)' '119,136,153' 'hsl(210, 14.3%, 53.3%)' %%CODEBLOCK2%% pastel lighten 0.2 orchid orange lawngreen %%CODEBLOCK3%% printf "%s\n" orchid orange lawngreen | pastel lighten 0.2 %%CODEBLOCK4%% pastel color red | pastel mix - blue %%CODEBLOCK5%% bash pastel format hsl ff8000 %%CODEBLOCK6%% bash pastel color "rgb(255,50,127)" pastel color 556270 4ecdc4 c7f484 ff6b6b c44d58 %%CODEBLOCK7%% bash pastel pick %%CODEBLOCK8%% pastel distinct 8 %%CODEBLOCK9%% bash pastel list %%CODEBLOCK10%% bash pastel format name 44cc11 %%CODEBLOCK11%% bash bg="hotpink" fg="$(pastel textcolor "$bg")" pastel paint "$fg" --on "$bg" "well readable text" %%CODEBLOCK12%% bash pastel paint -n black --on red --bold " ERROR! " echo " A serious error" pastel paint -n black --on yellow --bold " WARNING! " echo " A warning message" pastel paint -n black --on limegreen --bold " INFO " echo -n " Informational message with a " echo -n "highlighted" | pastel paint -n default --underline echo " word" %%CODEBLOCK13%% bash wget "https://github.com/sharkdp/pastel/releases/download/v0.11.0/pastel_0.11.0_amd64.deb" sudo dpkg -i pastel_0.11.0_amd64.deb %%CODEBLOCK14%%bash sudo apt update sudo apt install pastel %%CODEBLOCK15%% sudo pacman -S pastel %%CODEBLOCK16%% nix-env --install pastel %%CODEBLOCK17%% brew install pastel %%CODEBLOCK18%% scoop install pastel %%CODEBLOCK19%%bash winget install sharkdp.pastel %%CODEBLOCK20%% sudo snap install pastel %%CODEBLOCK21%% pkgin install pastel %%CODEBLOCK22%% cd /usr/pkgsrc/graphics/pastel make install %%CODEBLOCK23%% cargo install pastel %%CODEBLOCK24%% git clone https://github.com/sharkdp/pastel cargo install --path ./pastel ``

Resources

Interesting Wikipedia pages:

Color names:

Maximally distinct colors:

Other articles and videos:

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.