This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

26
node_modules/khroma/test/methods/lightness.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
/* IMPORT */
import {describe} from 'fava';
import {lightness} from '../../dist/index.js';
/* MAIN */
describe ( 'lightness', it => {
it ( 'gets the lightness channel of the color', t => {
const tests = [
['hsl(10, 20%, 30%)', 30],
['rgb(10, 20, 30)', 7.8431372549],
['rgb(0, 0, 0)', 0],
['#102030', 12.5490196078]
];
tests.forEach ( ([ color, output ]) => {
t.is ( lightness ( color ), output );
});
});
});