Skip to content

Commit 59cc3ae

Browse files
committed
Sync precision of L in hash and in input
1 parent d05e19f commit 59cc3ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/colors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function formatLch(color: AnyLch): string {
138138
if (typeof alpha !== 'undefined' && alpha < 1) {
139139
postfix = ` / ${clean(100 * alpha)}%`
140140
}
141-
return `${COLOR_FN}(${clean(l / L_MAX)} ${c} ${h}${postfix})`
141+
return `${COLOR_FN}(${clean(l / L_MAX, 4)} ${c} ${h}${postfix})`
142142
}
143143

144144
// Hack to avoid ,999999 because of float bug implementation

0 commit comments

Comments
 (0)