Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 7a8e0db

Browse files
committed
hotfix contrast
1 parent 4a68154 commit 7a8e0db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/helpers/Colors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export function grey(value: number) {
3030
* @returns @type {HSL} object
3131
*/
3232
export function castStringtoHsl(str: string): HSL {
33+
if (!str) {
34+
return { h: 0, s: 0, l: 0 };
35+
}
36+
3337
const hslRegex = /^hsl\((\d{1,15}),\s*(\d{1,15})%,\s*(\d{1,15})%\)$/;
3438
const match = str.match(hslRegex);
3539
if (match) {

0 commit comments

Comments
 (0)