import { Color } from "https://deno.land/x/threejs_4_deno@v121/src/Three.js";
Represents a color. See also ColorUtils.
Examples
const color = new THREE.Color( 0xff0000 );
const color = new THREE.Color( 0xff0000 );
Constructors
Methods
Clones this color.
Converts this color from gamma to linear space.
Converts this color from linear to gamma space.
Converts this color from linear to sRGB space.
Converts this color from sRGB to linear space.
Copies given color making conversion from gamma to linear space.
Copies given color making conversion from linear to gamma space.
Copies given color making conversion from linear to sRGB space.
Copies given color making conversion from sRGB to linear space.
Sets this color's red, green and blue value from the provided array.
Sets this color's red, green and blue value from the provided array-like.
Returns the hexadecimal value of this color.
Returns the string formated hexadecimal value of this color.
Returns the value of this color in CSS context style. Example: rgb(r, g, b)
Sets this color from a color name. Faster than Color#setStyle | .setStyle() method if you don't need the other CSS-style formats.
Sets this color from HSL values. Based on MochiKit implementation by Bob Ippolito.
Returns an array [red, green, blue], or copies red, green and blue into the provided array.
Copies red, green and blue into the provided array-like.