sharkdp / pastel

A command-line tool to generate, analyze, convert and manipulate colors
Apache License 2.0
5.08k stars 102 forks source link

Show name if a given color has one #77

Closed danieledapo closed 5 years ago

danieledapo commented 5 years ago

As of now, pastel show ff0000 shows the following:

Screenshot from 2019-08-29 13-17-01

I think that it'd be useful to add a Name: section where to put the name of the color if it has one. Also, I think that hiding it from the most similar list makes sense because it is that color after all.

I have played around with this idea a bit and came up with

Screenshot from 2019-08-29 13-19-51

If you think that's something worth having then I'm happy to submit a PR, otherwise feel free to close this issue. Let me know what you think.

sharkdp commented 5 years ago

Thank you for the feedback.

I have been thinking about a similar feature. From a "UI" perspective, an alternative would be to show a marker (e.g. *) after the color name or to highlight the "red" entry in the "Most similar" list. This way, the output would always have the same shape.

But I also like your suggestion. Showing only two entries in the "most similar" list - like in your screenshot - keeps the symmetry.

If you would like to experiment with this, I'd be happy to take a PR :+1: