Optionalcolor: ColorRepresentationBlue channel value between 0.0 and 1.0. Default is 1.
Green channel value between 0.0 and 1.0. Default is 1.
ReadonlyisRed channel value between 0.0 and 1.0. Default is 1.
StaticNAMESList of X11 color names.
Clones this color.
Converts this color from LinearSRGBColorSpace to SRGBColorSpace.
Converts this color from SRGBColorSpace to LinearSRGBColorSpace.
Sets this color's red, green and blue value from the provided array or array-like.
the source array or array-like.
Optionaloffset: number(optional) offset into the array-like. Default is 0.
Returns the hexadecimal value of this color.
OptionalcolorSpace: stringReturns the string formatted hexadecimal value of this color.
OptionalcolorSpace: stringReturns the value of this color in CSS context style. Example: rgb(r, g, b)
OptionalcolorSpace: stringSets 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: stringOptionalcolorSpace: stringSets 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: stringSets 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: stringSets this color from a CSS context style string.
OptionalcolorSpace: stringReturns 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.
This method defines the serialization result of Color.
The color as a hexadecimal value.
Class representing a color.
A Color instance is represented by RGB components in the linear working color space, which defaults to
LinearSRGBColorSpace. Inputs conventionally usingSRGBColorSpace(such as hexadecimals and CSS strings) are converted to the working color space automatically.Source color spaces may be specified explicitly, to ensure correct conversions.
If THREE.ColorManagement is disabled, no conversions occur. For details, see Color management.
Iterating through a Color instance will yield its components (r, g, b) in the corresponding order.