Optional
color: ColorRepresentationStatic
NAMESList of X11 color names.
Readonly
isRed channel value between 0 and 1. Default is 1.
Green channel value between 0 and 1. Default is 1.
Blue channel value between 0 and 1. Default is 1.
Rest
...args: [color: ColorRepresentation] | [r: number, g: number, b: number]Optional
colorSpace: ColorSpaceSets this color from RGB values.
Red channel value between 0 and 1.
Green channel value between 0 and 1.
Blue channel value between 0 and 1.
Optional
colorSpace: ColorSpaceSets this color from HSL values.
Based on MochiKit implementation by Bob Ippolito.
Hue channel value between 0 and 1.
Saturation value channel between 0 and 1.
Value channel value between 0 and 1.
Optional
colorSpace: ColorSpaceSets this color from a CSS context style string.
Optional
colorSpace: ColorSpaceSets this color from a color name.
Faster than .setStyle() method if you don't need the other CSS-style formats.
Color name in X11 format.
Optional
colorSpace: ColorSpaceCopies given color.
Color to copy.
Returns the hexadecimal value of this color.
Optional
colorSpace: ColorSpaceReturns the string formated hexadecimal value of this color.
Optional
colorSpace: ColorSpaceOptional
colorSpace: ColorSpaceOptional
colorSpace: ColorSpaceReturns the value of this color in CSS context style.
Example: rgb(r, g, b)
Optional
colorSpace: ColorSpaceSets this color's red, green and blue value from the provided array or array-like.
the source array or array-like.
Optional
offset: number(optional) offset into the array-like. Default is 0.
Returns an array [red, green, blue], or copies red, green and blue into the provided array.
Optional
array: number[](optional) array to store the color to. If this is not provided, a new array will be created.
Optional
offset: number(optional) optional offset into the array.
The created or provided array.
Copies red, green and blue into the provided array-like.
Optional
offset: number(optional) optional offset into the array-like.
The provided array-like.
Represents a color. See also ColorUtils.
see https://github.com/mrdoob/three.js/blob/master/src/math/Color.js|src/math/Color.js
Example