Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why disregarding bright colors? #54

Open
skripnik opened this issue Nov 28, 2022 · 2 comments
Open

Why disregarding bright colors? #54

skripnik opened this issue Nov 28, 2022 · 2 comments

Comments

@skripnik
Copy link

Current implementation disregards all the colors that are rgb(250, 250, 250) or brighter (see THRESHOLD_WHITE variable).

This can be useful for some users. Let's say you want to get a dominant color of a dress for an online shop and all the pictures are on white background.

But why this is default behaviour? Why this can't be changed? Why there's nothing about it in the description?

I wish by default all the bright colors also would be considered by algorithm, but user can explicitly add a parameter like $threshhold_white to exclude them.

@ksubileau
Copy link
Owner

This library is originally a port of the Javascript library of the same name, with the primary intention to have the same API, (almost) the same result, and the same features. This behavior is therefore inherited from this JavaScript library, which also does not provide a way to disable it.

However, since the original library does not evolve very much, I've added some additional features in the last few versions, and this could perhaps be added in a future one.

@araeubig
Copy link

araeubig commented Aug 3, 2024

This would really be great if you could add this. By analyzing photographies and black/white photographies too, i couldn't have the "white" colors in the palette.

Perhaps it would be great to get a possibility to overwrite this at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants