Conversation Colors
This commit is contained in:
parent
b63d8e908c
commit
28f016ce48
128 changed files with 3997 additions and 1207 deletions
23
ts/test-both/util/getHSL_test.ts
Normal file
23
ts/test-both/util/getHSL_test.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getHSL } from '../../util/getHSL';
|
||||
|
||||
describe('getHSL', () => {
|
||||
it('returns expected lightness values', () => {
|
||||
const saturation = 100;
|
||||
assert.equal(getHSL({ hue: 0, saturation }), 'hsl(0, 100%, 45%)');
|
||||
assert.equal(getHSL({ hue: 60, saturation }), 'hsl(60, 100%, 30%)');
|
||||
assert.equal(getHSL({ hue: 90, saturation }), 'hsl(90, 100%, 30%)');
|
||||
assert.equal(getHSL({ hue: 180, saturation }), 'hsl(180, 100%, 30%)');
|
||||
assert.equal(getHSL({ hue: 240, saturation }), 'hsl(240, 100%, 50%)');
|
||||
assert.equal(getHSL({ hue: 300, saturation }), 'hsl(300, 100%, 40%)');
|
||||
assert.equal(getHSL({ hue: 360, saturation }), 'hsl(360, 100%, 45%)');
|
||||
});
|
||||
|
||||
it('calculates lightness between values', () => {
|
||||
assert.equal(getHSL({ hue: 210, saturation: 100 }), 'hsl(210, 100%, 40%)');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue