First commit.

Signed-off-by: Chen Xiao <abigwc@gmail.com>
This commit is contained in:
Chen Xiao
2026-05-08 14:43:16 +08:00
commit 0b64e2de94
10989 changed files with 2253791 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
/* IMPORT */
import {describe} from 'fava';
import {alpha} from '../../dist/index.js';
/* MAIN */
describe ( 'alpha', it => {
it ( 'gets the alpha channel of the color', t => {
const tests = [
['rgba(10, 20, 30)', 1],
['rgba(10, 20, 30, 0.1)', 0.1],
['#10203040', 0.2509803922],
['hsla(10, 20%, 30%, 0.5)', 0.5]
];
tests.forEach ( ([ color, output ]) => {
t.is ( alpha ( color ), output );
});
});
});