Tweak average color algorithm
This commit is contained in:
parent
31eb22f968
commit
e7c15ef5f1
1 changed files with 4 additions and 4 deletions
|
@ -15,11 +15,11 @@ export const useFastAverageColor = (
|
||||||
fac.getColorAsync(src, {
|
fac.getColorAsync(src, {
|
||||||
algorithm: aglorithm || 'dominant',
|
algorithm: aglorithm || 'dominant',
|
||||||
ignoredColor: [
|
ignoredColor: [
|
||||||
[255, 255, 255, 255, 55], // White
|
[255, 255, 255, 255, 90], // White
|
||||||
[0, 0, 0, 255, 20], // Black
|
[0, 0, 0, 255, 30], // Black
|
||||||
[0, 0, 0, 0, 20], // Transparent
|
[0, 0, 0, 0, 40], // Transparent
|
||||||
],
|
],
|
||||||
mode: 'speed',
|
mode: 'precision',
|
||||||
})
|
})
|
||||||
.then((color) => {
|
.then((color) => {
|
||||||
return setColor(color.rgb);
|
return setColor(color.rgb);
|
||||||
|
|
Reference in a new issue