mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
chore: linting fixes && github actions for linting (#612)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user