personal web client for Bluesky
typescript solidjs bluesky atcute

fix: make contrast check work

mary.my.id 8876af41 87b9c1ce

verified
Changed files
+1 -2
src
components
+1 -2
src/components/bookmarks/bookmark-folder-avatar.tsx
··· 71 71 72 72 export const getForegroundColor = (rgb: RgbArray) => { 73 73 const whiteContrast = contrastRatioAPCA(rgb, [255, 255, 255]); 74 - const blackContrast = contrastRatioAPCA(rgb, [0, 0, 0]); 75 - const textColor = whiteContrast >= blackContrast ? '#fff' : '#000'; 74 + const textColor = whiteContrast >= 20_000 ? '#fff' : '#000'; 76 75 77 76 return textColor; 78 77 };