All Projects â†’ sharkdp â†’ Pastel

sharkdp / Pastel

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

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Pastel

Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+723.97%)
Mutual labels:  cli, terminal, command-line, tool
Csview
📠 A high performance csv viewer with cjk/emoji support.
Stars: ✭ 208 (-94.44%)
Mutual labels:  cli, terminal, command-line, tool
Fsq
A tool for querying the file system with a SQL-like language.
Stars: ✭ 60 (-98.4%)
Mutual labels:  cli, terminal, command-line, tool
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+430.49%)
Mutual labels:  cli, terminal, command-line, tool
Lucid
A simple mock-application for programs that work with child processes
Stars: ✭ 45 (-98.8%)
Mutual labels:  cli, terminal, command-line, tool
Laravel Zero
A PHP framework for console artisans
Stars: ✭ 2,821 (-24.61%)
Mutual labels:  cli, terminal, command-line, tool
Teip
Select partial standard input and replace with the result of another command efficiently
Stars: ✭ 280 (-92.52%)
Mutual labels:  cli, terminal, command-line, tool
Cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
Stars: ✭ 2,912 (-22.18%)
Mutual labels:  cli, terminal, command-line
Commander
Test your command line interfaces on windows, linux and osx and nodes viá ssh and docker
Stars: ✭ 183 (-95.11%)
Mutual labels:  cli, terminal, command-line
Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+18.17%)
Mutual labels:  cli, terminal, command-line
Ascii
👾 ASCII Roulette :: ascii art video chat on the cli
Stars: ✭ 202 (-94.6%)
Mutual labels:  cli, terminal, command-line
Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (-94.58%)
Mutual labels:  cli, terminal, command-line
Stonky
A command line dashboard for monitoring stocks
Stars: ✭ 208 (-94.44%)
Mutual labels:  cli, terminal, command-line
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-95.38%)
Mutual labels:  cli, terminal, command-line
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+29.53%)
Mutual labels:  cli, terminal, tool
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+276.7%)
Mutual labels:  cli, terminal, command-line
Proji
A powerful cross-platform CLI project templating tool.
Stars: ✭ 156 (-95.83%)
Mutual labels:  cli, command-line, tool
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-96.63%)
Mutual labels:  cli, terminal, command-line
Jquery.terminal
jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
Stars: ✭ 2,623 (-29.9%)
Mutual labels:  cli, terminal, command-line
Go Termd
Package termd provides terminal markdown rendering, with code block syntax highlighting support.
Stars: ✭ 223 (-94.04%)
Mutual labels:  cli, terminal, command-line

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

pastel

To get more information about a specific subcommand (say mix), you can call pastel mix -h or pastel help mix.

Composition

Many pastel commands can be composed by piping the output of one command to another, for example:

pastel random | pastel mix red | pastel lighten 0.2 | pastel format hex

Specifying colors

Colors can be specified in many different formats:

lightslategray
'#778899'
778899
789
'rgb(119, 136, 153)'
'119,136,153'
'hsl(210, 14.3%, 53.3%)'

Colors can be passed as positional arguments, for example:

pastel lighten 0.2 orchid orange lawngreen

They can also be read from standard input. So this is equivalent:

printf "%s\n" orchid orange lawngreen | pastel lighten 0.2

You can also explicitly specify which colors you want to read from the input. For example, this mixes red (which is read from STDIN) with blue (which is passed on the command line):

pastel color red | pastel mix - blue

Use cases and demo

Converting colors from one format to another

pastel format hsl ff8000

Show and analyze colors on the terminal

pastel color "rgb(255,50,127)"

pastel color 556270 4ecdc4 c7f484 ff6b6b c44d58

Pick a color from somewhere on the screen

pastel pick

Generate a set of N visually distinct colors

pastel distinct 8

Get a list of all X11 / CSS color names

pastel list

Name a given color

pastel format name 44cc11

Print colorized text from a shell script

bg="hotpink"
fg="$(pastel textcolor "$bg")"

pastel paint "$fg" --on "$bg" "well readable text"
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"

Installation

On Debian-based systems

You can download the latest Debian package from the release page and install it via dpkg:

wget "https://github.com/sharkdp/pastel/releases/download/v0.8.1/pastel_0.8.1_amd64.deb"
sudo dpkg -i pastel_0.8.1_amd64.deb

On Arch Linux

You can install pastel from the AUR package:

yay -S pastel

On Nix

You can install pastel from the Nix package:

nix-env --install pastel

On MacOS

You can install pastel via Homebrew

brew install pastel

On Windows

You can install pastel via Scoop

scoop install pastel

Via snap package

Get it from the Snap Store:

sudo snap install pastel

On NetBSD

Using the package manager:

pkgin install pastel

From source:

cd /usr/pkgsrc/graphics/pastel
make install

On other distributions

Check out the release page for binary builds.

Via cargo (source)

If you do not have cargo, install using rust's installation documentation.

If you have Rust 1.43 or higher, you can install pastel from source via cargo:

cargo install pastel

Alternatively, you can install pastel directly from this repository by using

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

at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].