Fix custom color backup import/export

This commit is contained in:
ayumi-signal 2024-12-11 08:57:34 -08:00 committed by GitHub
parent 734929f74f
commit c7dc4279a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 96 additions and 31 deletions

View file

@ -3,7 +3,7 @@
import { assert } from 'chai';
import { rgbToHSL } from '../../util/rgbToHSL';
import { rgbIntToHSL, rgbToHSL } from '../../util/rgbToHSL';
describe('rgbToHSL', () => {
it('converts pure rgb colors', () => {
@ -40,3 +40,11 @@ describe('rgbToHSL', () => {
});
});
});
describe('rgbIntToHSL', () => {
it('converts pure rgb colors', () => {
assert.deepStrictEqual(rgbIntToHSL(4294901760), { h: 0, s: 1, l: 0.5 });
assert.deepStrictEqual(rgbIntToHSL(4278255360), { h: 120, s: 1, l: 0.5 });
assert.deepStrictEqual(rgbIntToHSL(4278190335), { h: 240, s: 1, l: 0.5 });
});
});