|
@@ -108,55 +108,55 @@
|
|
|
<div>
|
|
|
Sets this color from a hexadecimal value.
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.setStyle( [page:String style] ) [page:this]</h3>
|
|
|
<div>
|
|
|
style — color as a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red"
|
|
|
</div>
|
|
|
<div>
|
|
|
- Sets this color from a CSS-style string.
|
|
|
+ Sets this color from a CSS-style string.
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.getStyle() [page:String]</h3>
|
|
|
<div>
|
|
|
Returns the value of this color as a CSS-style string. Example: rgb(255,0,0)
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.setHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:this]</h3>
|
|
|
<div>
|
|
|
h — hue value between 0.0 and 1.0 <br />
|
|
|
s — saturation value between 0.0 and 1.0 <br />
|
|
|
- l — lightness value between 0.0 and 1.0
|
|
|
+ l — lightness value between 0.0 and 1.0
|
|
|
</div>
|
|
|
<div>
|
|
|
Sets color from hsl
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.getHSL() [page:Object hsl]</h3>
|
|
|
<div>
|
|
|
- Returns an object with properties h, s, and l.
|
|
|
+ Returns an object with properties h, s, and l.
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.offsetHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Adds given h, s, and l to this color's existing h, s, and l values.
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.add ( [page:Color color] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Adds rgb values of given color to rgb values of this color
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.addColors( [page:Color color1], [page:Color color2] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Sets this color to the sum of color1 and color2
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.addScalar( [page:Number s] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Adds s to the rgb values of this color
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.multiply( [page:Color color] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Multiplies this color's rgb values by given color's rgb values
|
|
@@ -166,17 +166,17 @@
|
|
|
<div>
|
|
|
Multiplies this color's rgb values by s
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.lerp( [page:Color color], alpha ) [page:this]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ todo
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.equals( [page:Color c] ) [page:this]</h3>
|
|
|
<div>
|
|
|
Compares this color and c and returns true if they are the same, false otherwise.
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<h3>.clone() [page:Color]</h3>
|
|
|
<div>
|
|
|
Clones this color.
|
|
@@ -184,10 +184,10 @@
|
|
|
|
|
|
<h3>.set([page:todo value]) [page:todo]</h3>
|
|
|
<div>
|
|
|
- value -- todo
|
|
|
+ value -- either an instance of Color, a hexadecimal value, or a css style string
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Delegates to .copy, .setStyle, or .setHex depending on input type.
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|