Optionalcolor: ColorRepresentationStaticNAMESList of X11 color names.
ReadonlyisRed 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]OptionalcolorSpace: 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.
OptionalcolorSpace: 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.
OptionalcolorSpace: ColorSpaceSets this color from a CSS context style string.
OptionalcolorSpace: 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.
OptionalcolorSpace: ColorSpaceCopies given color.
Color to copy.
Returns the hexadecimal value of this color.
OptionalcolorSpace: ColorSpaceReturns the string formated hexadecimal value of this color.
OptionalcolorSpace: ColorSpaceOptionalcolorSpace: ColorSpaceOptionalcolorSpace: ColorSpaceReturns the value of this color in CSS context style. Example: rgb(r, g, b)
OptionalcolorSpace: ColorSpaceReturns an array [red, green, blue], or copies red, green and blue into the provided array.
Optionalarray: number[](optional) array to store the color to. If this is not provided, a new array will be created.
Optionaloffset: number(optional) optional offset into the array.
The created or provided array.
Copies red, green and blue into the provided array-like.
Optionaloffset: 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