Giter Club home page Giter Club logo

Comments (9)

michkowalczuk avatar michkowalczuk commented on July 20, 2024

Also waiting for the answer.
What C=100 means i your app? Do you make any normalization?

from iwanthue.

Yomguithereal avatar Yomguithereal commented on July 20, 2024

I am not really sure here, frankly. I have found in the wild at least 3 different bounds for the C parameter: 100, 134 and 180. So if someone wants to investigate a little bit to understand whether iwanthue implementation is correct or not, I'll be grateful.

from iwanthue.

emmanuel-ichbiah avatar emmanuel-ichbiah commented on July 20, 2024

I have looked at a code a long time ago and what I can say is:

  • I don't recall that there is any normalization occuring for C. It is just the C range selector which is configured for a [0,100] range whereas it should be [0,~134].
  • else the implementation seems correct to me

from iwanthue.

Yomguithereal avatar Yomguithereal commented on July 20, 2024

@emmanuel-ichbiah @michkowalczuk I have edited the range picker on the website to accept max chroma 134. Can you tell me whether this feels right, in which case I will also fix the color validation code in the npm package.

from iwanthue.

emmanuel-ichbiah avatar emmanuel-ichbiah commented on July 20, 2024

@emmanuel-ichbiah @michkowalczuk I have edited the range picker on the website to accept max chroma 134. Can you tell me whether this feels right, in which case I will also fix the color validation code in the npm package.

Seems perfect to me! Thank you!

from iwanthue.

Yomguithereal avatar Yomguithereal commented on July 20, 2024

Thanks @emmanuel-ichbiah. I cannot find any validation problem to accept cmax = 134 in the code of the npm package so I think I will leave it at that. Of course the all preset is a bit misleading because its cmax is set to 100 but you can override it and I feel it will annoy people if I change it without forcing a breaking change.

from iwanthue.

michkowalczuk avatar michkowalczuk commented on July 20, 2024

I have looked at a code a long time ago and what I can say is:

  • I don't recall that there is any normalization occuring for C. It is just the C range selector which is configured for a [0,100] range whereas it should be [0,~134].
  • else the implementation seems correct to me

It's not such a simple thing...
Chroma maximum value depends on combination of Hue and Luminance , as you can find here and here.

There is no perfect solution here. The most correct solution seems to be that when selecting colors, it checks whether it is possible to convert the color to RGB for a given combination of l,c,h. You can read about color clamping for example here and here.

from iwanthue.

emmanuel-ichbiah avatar emmanuel-ichbiah commented on July 20, 2024

«Chroma maximum value depends on combination of Hue and Luminance»
I perfectly know this.

But if you restrain the C selector to a 0 - 100 range you, depending on your H and L range selection you will NOT get all possible colors for that H and L ranges.

Overall I agree that there are not many colors with a C > 100 but nevertheless the former implementation was misleading. It gave the impression that there were NONE.

from iwanthue.

michkowalczuk avatar michkowalczuk commented on July 20, 2024

former

It's just a theoretical considerations ;-) Regardless of what the Chroma value is the theoretical upper limit, iWantHue is a great tool. I appreciate your work!

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.