Tweak dynamic theme dominant color detection
Currently, a lot of manga have the same whit/black-ish background color, which results of the thumbnails containing a lot of white/black colors. These changes improve this a little - reduce impact of white and black colors - use "precision" mode of algorithm
This commit is contained in:
@@ -189,7 +189,14 @@ const Thumbnail = ({
|
||||
img.onload = () => {
|
||||
Promise.all([
|
||||
Vibrant.from(img).getPalette(),
|
||||
new FastAverageColor().getColorAsync(img, { algorithm: 'dominant' }),
|
||||
new FastAverageColor().getColorAsync(img, {
|
||||
algorithm: 'dominant',
|
||||
mode: 'precision',
|
||||
ignoredColor: [
|
||||
[255, 255, 255, 255, 75],
|
||||
[0, 0, 0, 255, 75],
|
||||
],
|
||||
}),
|
||||
]).then(([palette, averageColor]) => {
|
||||
if (
|
||||
!palette.Vibrant ||
|
||||
|
||||
Reference in New Issue
Block a user