Skip to content

Commit bdeab92

Browse files
committed
recognize #hex and rgb/hsl colors
1 parent a884a02 commit bdeab92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

types/three/src/utils.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import { Color, ColorKeyword } from './math/Color';
22

3-
export type ColorRepresentation = Color | ColorKeyword | number;
3+
export type StyleColorString = `${'rgb' | 'hsl'}(${string})`;
4+
export type HexColorString = `#${string & { length: 3 | 6 }}`;
5+
6+
export type ColorRepresentation = Color | ColorKeyword | StyleColorString | HexColorString | number;

0 commit comments

Comments
 (0)