Coder Social home page Coder Social logo

Comments (6)

axsk avatar axsk commented on May 24, 2024

Reading further I realized that in LCH the luminance is defined to be in [0,100],
so I screwed this up :/
Comparing again Colors.distinguishable_colors(8)
image
with Color.distinguishable_colors(8)
image
made me wonder though why yellow is skipped in favour of a third blue (I don't find 5 and 8 so easy to distinguish :/) in the new version...

Well, it's not broken so feel free to close this.

from colors.jl.

axsk avatar axsk commented on May 24, 2024

Oh, would we maybe have some space for fixed color palettes like these?

from colors.jl.

timholy avatar timholy commented on May 24, 2024

The difference between the old and new is that it performs the computations in LCHab space in the new one; it constantly converts between RGB and LCHab in the old one. There could, of course, be a bug; you could @show the color differences between candidates you like and the ones it chooses, if you feel like diving into this.

from colors.jl.

timholy avatar timholy commented on May 24, 2024

I'd be fine with having some fixed palettes. There's a ColorBrewer package already, interestingly. Not really my expertise, so others should chime in.

from colors.jl.

axsk avatar axsk commented on May 24, 2024

Correct me if I'm wrong, but increasing the desired number of colors just adds new colors to the palette and doesn't change the already obtained. I wonder if it possible to obtain the really maximally distinguishable colors this way. Shouldn't I have to move all colors when adding a new one?

The simple picture in my head is that of a circle. When choosing n points with maximal distance I divide it into equally large sectors, but this requires changing multiple points when increasing n.

from colors.jl.

timholy avatar timholy commented on May 24, 2024

Correct. This package produces the nth distinguishable color as the one "farthest" from the first n-1. It does not reconsider the first n-1 in light of the chosen value for the nth.

Another algorithm would, of course, make a fine contribution. Would be interesting to compare performance.

from colors.jl.

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.