chore: linting fixes && github actions for linting (#612)

This commit is contained in:
Ahmed Sbai
2025-03-31 07:44:10 +02:00
committed by GitHub
parent 16b834cf71
commit b9bb109f4a
105 changed files with 604 additions and 570 deletions

View File

@@ -41,7 +41,7 @@ const calculateContrastRatio = (rgb1: number[], rgb2: number[]): number => {
const calculateRelativeLuminance = (rgb: number[]): number => {
const [r, g, b] = rgb.map((c) => {
c /= 255;
return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
});
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
};