Open pd2871 opened 3 years ago
Or at least make it configurable:
old:
def get_palette(self, color_count=10, quality=10):
new:
def get_palette(self, color_count=10, quality=10, ignore_white=True):
and only do the thresholding if ignore_white
is True
.
There's already a PR for this: https://github.com/fengsp/color-thief-py/pull/11
The code will not be able to detect complete dominant white images with values like
(254,254,254)
.Please modify the code of
get_palette()
to:Setting the threshold of
250
is causing the problem