|
@@ -76,7 +76,7 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
|
|
|
|
<h3>[property:Boolean isColor]</h3>
|
|
<h3>[property:Boolean isColor]</h3>
|
|
<p>
|
|
<p>
|
|
- Read-only flag to check whether a given object is of type [name].
|
|
|
|
|
|
+ Read-only flag to check if a given object is of type [name].
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<h3>[property:Float r]</h3>
|
|
<h3>[property:Float r]</h3>
|
|
@@ -161,13 +161,13 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
Sets this color's components from the [page:BufferAttribute attribute].
|
|
Sets this color's components from the [page:BufferAttribute attribute].
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:Integer getHex]()</h3>
|
|
|
|
|
|
+ <h3>[method:Integer getHex]( [param:string colorSpace] = SRGBColorSpace )</h3>
|
|
<p>Returns the hexadecimal value of this color.</p>
|
|
<p>Returns the hexadecimal value of this color.</p>
|
|
|
|
|
|
- <h3>[method:String getHexString]()</h3>
|
|
|
|
|
|
+ <h3>[method:String getHexString]( [param:string colorSpace] = SRGBColorSpace )</h3>
|
|
<p>Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').</p>
|
|
<p>Returns the hexadecimal value of this color as a string (for example, 'FFFFFF').</p>
|
|
|
|
|
|
- <h3>[method:Object getHSL]( [param:Object target] )</h3>
|
|
|
|
|
|
+ <h3>[method:Object getHSL]( [param:Object target], [param:string colorSpace] = LinearSRGBColorSpace )</h3>
|
|
<p>
|
|
<p>
|
|
[page:Object target] — the result will be copied into this Object. Adds h, s and l keys to the object (if not already present).<br /><br />
|
|
[page:Object target] — the result will be copied into this Object. Adds h, s and l keys to the object (if not already present).<br /><br />
|
|
|
|
|
|
@@ -180,7 +180,7 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
|
|
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:String getStyle]()</h3>
|
|
|
|
|
|
+ <h3>[method:String getStyle]( [param:string colorSpace] = SRGBColorSpace )</h3>
|
|
<p>Returns the value of this color as a CSS style string. Example: 'rgb(255,0,0)'.</p>
|
|
<p>Returns the value of this color as a CSS style string. Example: 'rgb(255,0,0)'.</p>
|
|
|
|
|
|
<h3>[method:this lerp]( [param:Color color], [param:Float alpha] ) </h3>
|
|
<h3>[method:this lerp]( [param:Color color], [param:Float alpha] ) </h3>
|
|
@@ -237,14 +237,14 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
Delegates to [page:.copy], [page:.setStyle], or [page:.setHex] depending on input type.
|
|
Delegates to [page:.copy], [page:.setStyle], or [page:.setHex] depending on input type.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:this setHex]( [param:Integer hex] ) </h3>
|
|
|
|
|
|
+ <h3>[method:this setHex]( [param:Integer hex], [param:string colorSpace] = SRGBColorSpace ) </h3>
|
|
<p>
|
|
<p>
|
|
[page:Integer hex] — [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] format.<br /><br />
|
|
[page:Integer hex] — [link:https://en.wikipedia.org/wiki/Web_colors#Hex_triplet hexadecimal triplet] format.<br /><br />
|
|
|
|
|
|
Sets this color from a hexadecimal value.
|
|
Sets this color from a hexadecimal value.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:this setHSL]( [param:Float h], [param:Float s], [param:Float l] ) </h3>
|
|
|
|
|
|
+ <h3>[method:this setHSL]( [param:Float h], [param:Float s], [param:Float l], [param:string colorSpace] = LinearSRGBColorSpace ) </h3>
|
|
<p>
|
|
<p>
|
|
[page:Float h] — hue value between 0.0 and 1.0 <br />
|
|
[page:Float h] — hue value between 0.0 and 1.0 <br />
|
|
[page:Float s] — saturation value between 0.0 and 1.0 <br />
|
|
[page:Float s] — saturation value between 0.0 and 1.0 <br />
|
|
@@ -253,7 +253,7 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
Sets color from HSL values.
|
|
Sets color from HSL values.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:this setRGB]( [param:Float r], [param:Float g], [param:Float b] ) </h3>
|
|
|
|
|
|
+ <h3>[method:this setRGB]( [param:Float r], [param:Float g], [param:Float b], [param:string colorSpace] = LinearSRGBColorSpace ) </h3>
|
|
<p>
|
|
<p>
|
|
[page:Float r] — Red channel value between 0.0 and 1.0.<br />
|
|
[page:Float r] — Red channel value between 0.0 and 1.0.<br />
|
|
[page:Float g] — Green channel value between 0.0 and 1.0.<br />
|
|
[page:Float g] — Green channel value between 0.0 and 1.0.<br />
|
|
@@ -269,7 +269,7 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
Sets all three color components to the value [page:Float scalar].
|
|
Sets all three color components to the value [page:Float scalar].
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:this setStyle]( [param:String style] ) </h3>
|
|
|
|
|
|
+ <h3>[method:this setStyle]( [param:String style], [param:string colorSpace] = SRGBColorSpace ) </h3>
|
|
<p>
|
|
<p>
|
|
[page:String style] — color as a CSS-style string.<br /><br />
|
|
[page:String style] — color as a CSS-style string.<br /><br />
|
|
|
|
|
|
@@ -288,7 +288,7 @@ const color7 = new THREE.Color( 1, 0, 0 );
|
|
Note that for X11 color names, multiple words such as Dark Orange become the string 'darkorange'.
|
|
Note that for X11 color names, multiple words such as Dark Orange become the string 'darkorange'.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
- <h3>[method:this setColorName]( [param:String style] ) </h3>
|
|
|
|
|
|
+ <h3>[method:this setColorName]( [param:String style], [param:string colorSpace] = SRGBColorSpace ) </h3>
|
|
<p>
|
|
<p>
|
|
[page:String style] — color name ( from [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color names] ).<br /><br />
|
|
[page:String style] — color name ( from [link:https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart X11 color names] ).<br /><br />
|
|
|
|
|