mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
config redirect
This commit is contained in:
27
node_modules/khroma/test/methods/saturation.js
generated
vendored
Normal file
27
node_modules/khroma/test/methods/saturation.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
/* IMPORT */
|
||||
|
||||
import {describe} from 'fava';
|
||||
import {saturation} from '../../dist/index.js';
|
||||
|
||||
/* MAIN */
|
||||
|
||||
describe ( 'saturation', it => {
|
||||
|
||||
it ( 'gets the saturation channel of the color', t => {
|
||||
|
||||
const tests = [
|
||||
['hsl(10, 20%, 30%)', 20],
|
||||
['rgb(10, 20, 30)', 50],
|
||||
['rgb(0, 0, 0)', 0],
|
||||
['#102030', 50],
|
||||
['#ff0000', 100]
|
||||
];
|
||||
|
||||
tests.forEach ( ([ color, output ]) => {
|
||||
t.is ( saturation ( color ), output );
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user