Skip to content

Commit

Permalink
πŸ’… Polish scores
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsolorio committed Feb 3, 2025
1 parent 85ef550 commit 69e8766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type ColorMode = 'hsl' | 'rgb';
const STORAGE_KEY = 'contrast-grid-colors';

const getContrastLabel = (ratio: number): JSX.Element | string => {
if (ratio >= 7) return <span className="bg-emerald-400 text-emerald-800 p-1 px-2 rounded-sm font-bold">βœ“ AAA</span>;
if (ratio >= 4.5) return <span className="bg-emerald-400 text-emerald-800 p-1 px-2 rounded-sm font-bold">βœ“ AA</span>;
if (ratio >= 7) return <span className="bg-emerald-400 text-emerald-900 p-1 px-2 rounded-sm font-bold">βœ“ AAA</span>;
if (ratio >= 4.5) return <span className="bg-emerald-400 text-emerald-900 p-1 px-2 rounded-sm font-bold">βœ“ AA</span>;
return <span className="p-1 rounded-sm font-bold">βœ• Failed</span>;
};

Expand Down

0 comments on commit 69e8766

Please sign in to comment.