Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
refactor: added ignored black color to get-color
Browse files Browse the repository at this point in the history
  • Loading branch information
Amiditin committed Apr 19, 2024
1 parent 5b42ba2 commit 3ec8ded
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ const LandingHero: FC<HeroProps> = ({ data, language }) => {

const getColor = async () => {
try {
const color = await fac.getColorAsync(videoElement, { algorithm: 'dominant' })
const color = await fac.getColorAsync(videoElement, {
algorithm: 'dominant',
ignoredColor: [0, 0, 0],
})
setBackgroundColor(color.rgb)
} catch (error) {
if (process.env.NODE_ENV !== 'production') throw error
Expand Down

0 comments on commit 3ec8ded

Please sign in to comment.