Skip to content

Commit 715d21c

Browse files
committed
fix(clerk-js): Improve invalid color error
1 parent 3cf7e22 commit 715d21c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/clerk-js/src/v4/utils/colors.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const keywords = {
2828
red: [255, 0, 0, 1],
2929
green: [0, 128, 0, 1],
3030
grey: [128, 128, 128, 1],
31+
gray: [128, 128, 128, 1],
3132
white: [255, 255, 255, 1],
3233
yellow: [255, 255, 0, 1],
3334
transparent: [0, 0, 0, 0],
@@ -264,7 +265,7 @@ const parse = (str: string): ParsedResult => {
264265
res = { model: 'rgb', value: parseRgb(str) };
265266
}
266267
if (!res || !res.value) {
267-
throw new Error(`Clerk: "${str}" is not a valid color. You can pass one of:
268+
throw new Error(`Clerk: "${str}" cannot be used as a color within 'variables'. You can pass one of:
268269
- any valid hsl or hsla color
269270
- any valid rgb or rgba color
270271
- any valid hex color

0 commit comments

Comments
 (0)