Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "short" display option? #139

Closed
kiedtl opened this issue May 15, 2021 · 2 comments
Closed

Support "short" display option? #139

kiedtl opened this issue May 15, 2021 · 2 comments

Comments

@kiedtl
Copy link

kiedtl commented May 15, 2021

A display mode as seen in the following images would be useful, as it makes it easier to visually compare colors.

and

Would a PR implementing this be merged?

@sharkdp
Copy link
Owner

sharkdp commented May 16, 2021

Thank you for your request. Please see #137 and #21.

@sharkdp
Copy link
Owner

sharkdp commented May 16, 2021

Also, note that pastel enables you to write scripts like this:

#!/bin/bash

cols=$(tput cols)
spaces=$(printf %"$((cols - 7))"s | tr " " " ")

for color in "$@"; do
    hex_code="$(pastel format hex "$color")"
    textcolor="$(pastel textcolor "$color")"
    pastel paint "$textcolor" --on "$color" "$hex_code$spaces"
done

which can be called like:

bash compare_colors.sh steelblue lime firebrick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants