diff --git a/src/components/smartChip/component/smartChip.component.ts b/src/components/smartChip/component/smartChip.component.ts index d076f2ddb0fbcc3a0a7800a9088662b90c722744..3e29b7b2229660bc8344a17cfe66b018df2bda38 100644 --- a/src/components/smartChip/component/smartChip.component.ts +++ b/src/components/smartChip/component/smartChip.component.ts @@ -19,8 +19,8 @@ const cssColorIsDark = (input: string) => { const match = /\((.*)\)/.exec(input) const [h, s, l] = match[1].split(",") const trimmedL = l.trim() - if (/\%$/.test(trimmedL)) { - const match = /^([0-9]+)\%/.exec(trimmedL) + if (/%$/.test(trimmedL)) { + const match = /^([0-9]+)%/.exec(trimmedL) return (parseInt(match[1]) / 100) < 0.4 } }