Giter Club home page Giter Club logo

Comments (6)

jacomyma avatar jacomyma commented on July 2, 2024

Yes that will fix a number of current issues! I'm in the process of updating the tool, but the change is bigger than I expected and impacts many aspects.

The biggest issue is that previous Chroma returned NaN when the conversion from Lab to RGB was impossible (out of bound coordinates). Now it always returns a color, which is a feature but prevents me from detecting when the coordinates are out of bound. Once this is fixed, I'll ship it!

from iwanthue.

devgru avatar devgru commented on July 2, 2024

For color validation I recommend using D3 v4 module called d3-color.

Mike Bostock created displayable() function so you just check it like

d3_color.rgb({r, g, b}).displayable()
d3_color.lab({l, a, b}).displayable()

See d3/d3-color#10 (comment)

from iwanthue.

jacomyma avatar jacomyma commented on July 2, 2024

Thanks for this advice :) !

from iwanthue.

jacomyma avatar jacomyma commented on July 2, 2024

I updated Chroma. I did not implement your suggestion and sticked to a tweak copied from Chroma source code. I think the next step would be to package the library into a d3 compatible module not requiring Chroma, but that's for another time! Thanks for your suggestions anyway.

from iwanthue.

devgru avatar devgru commented on July 2, 2024

You're welcome!

BTW looks like colors at http://tools.medialab.sciences-po.fr/iwanthue/ are still yellowish with C=0.

from iwanthue.

jacomyma avatar jacomyma commented on July 2, 2024

The repo is up to date but not yet the online website. In a few days.

from iwanthue.

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.