Git Product home page Git Product logo

Comments (7)

sharkdp avatar sharkdp commented on June 16, 2024 1

You could use the -f (--force-color) mode in your last pastel call and pipe to xargs echo. For example:

pastel distinct 12 | pastel sort | pastel -f format hex | xargs echo

or:

pastel list | pastel sort-by hue | pastel -f format name | xargs echo

from pastel.

sharkdp avatar sharkdp commented on June 16, 2024 1

Well. These colors all have a hue of zero:

▶ pastel format hsl-hue dimgray gainsboro gray lightgray
0
0
0
0

I agree, they don't look sorted, as the brightness goes up and down. So indeed, it would be useful to have a second (lower priority) sort order for the sort subcommand. Let's turn this into a feature request 👍

from pastel.

nkh avatar nkh commented on June 16, 2024

is there a way to sort by hue and luminosity?

from pastel.

sharkdp avatar sharkdp commented on June 16, 2024

Yes. Check out pastel sort-by --help.

from pastel.

nkh avatar nkh commented on June 16, 2024

I did but I see nothing there that tell me how to sort by Hue AND Brightness, trying to give both is an error and piping the first in the second doesn't sort on both criteria.

sorting on Hue gives, ie: dimgray, gainsboro, gray, lightgray

from pastel.

sharkdp avatar sharkdp commented on June 16, 2024

what does it mean to sort by "Hue AND Brightness"? Do you mean: Sort "by Hue, THEN by Brightness"? I.e.: For colors where the hue is exactly the same, sort by brightness?

from pastel.

nkh avatar nkh commented on June 16, 2024

an example explains better, if you look at the colors I listed in that order (given by sort-by hue) above do they look sorted to you?

from pastel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.