odin
Version:
Node.js Canvas/WebGL Javascript Game Framework
4,379 lines (1,198 loc) • 51.8 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Color</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Color</h1>
<section>
<header>
<h2>
Color
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Color"><span class="type-signature"></span>new Color<span class="signature">(Number, Number, Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">r</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">g</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line16">line 16</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="this.b"><span class="type-signature"><static> </span>this.b<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line41">line 41</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="this.g"><span class="type-signature"><static> </span>this.g<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">g</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="this.r"><span class="type-signature"><static> </span>this.r<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">r</td>
</tr>
</tbody>
</table></dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="add"><span class="type-signature"><static> </span>add<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line270">line 270</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="cadd"><span class="type-signature"><static> </span>cadd<span class="signature">(Color, Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">a</td>
</tr>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line286">line 286</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="cdiv"><span class="type-signature"><static> </span>cdiv<span class="signature">(Color, Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">a</td>
</tr>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line436">line 436</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="check"><span class="type-signature"><static> </span>check<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line523">line 523</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="clerp"><span class="type-signature"><static> </span>clerp<span class="signature">(Color, Color, Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">a</td>
</tr>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">x</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line558">line 558</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="clone"><span class="type-signature"><static> </span>clone<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line79">line 79</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="cmul"><span class="type-signature"><static> </span>cmul<span class="signature">(Color, Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">a</td>
</tr>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line384">line 384</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="copy"><span class="type-signature"><static> </span>copy<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line90">line 90</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="csub"><span class="type-signature"><static> </span>csub<span class="signature">(Color, Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">a</td>
</tr>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line335">line 335</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="div"><span class="type-signature"><static> </span>div<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line417">line 417</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="fromArray"><span class="type-signature"><static> </span>fromArray<span class="signature">(Array)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Array</code></td>
<td class="type">
</td>
<td class="description last">array</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line697">line 697</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="fromJSON"><span class="type-signature"><static> </span>fromJSON<span class="signature">(Object)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Object</code></td>
<td class="type">
</td>
<td class="description last">json</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line664">line 664</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="fromVec2"><span class="type-signature"><static> </span>fromVec2<span class="signature">(Vec2)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Vec2</code></td>
<td class="type">
</td>
<td class="description last">v</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line623">line 623</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="fromVec3"><span class="type-signature"><static> </span>fromVec3<span class="signature">(Vec3)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Vec3</code></td>
<td class="type">
</td>
<td class="description last">v</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line639">line 639</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="fromVec4"><span class="type-signature"><static> </span>fromVec4<span class="signature">(Vec4)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Vec4</code></td>
<td class="type">
</td>
<td class="description last">v</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line655">line 655</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="length"><span class="type-signature"><static> </span>length<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line473">line 473</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="lengthSq"><span class="type-signature"><static> </span>lengthSq<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line488">line 488</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="lerp"><span class="type-signature"><static> </span>lerp<span class="signature">(Color, Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">x</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line541">line 541</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="max"><span class="type-signature"><static> </span>max<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line601">line 601</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="min"><span class="type-signature"><static> </span>min<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line579">line 579</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="mul"><span class="type-signature"><static> </span>mul<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line368">line 368</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="normalize"><span class="type-signature"><static> </span>normalize<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line502">line 502</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="sadd"><span class="type-signature"><static> </span>sadd<span class="signature">(Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">s</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line303">line 303</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="sdiv"><span class="type-signature"><static> </span>sdiv<span class="signature">(Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">s</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line456">line 456</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="set"><span class="type-signature"><static> </span>set<span class="signature">(Number, Number, Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">r</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">g</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line106">line 106</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="setRGB"><span class="type-signature"><static> </span>setRGB<span class="signature">(Number, Number, Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">r</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">g</td>
</tr>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">b</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line133">line 133</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="setStyle"><span class="type-signature"><static> </span>setStyle<span class="signature">(String)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>String</code></td>
<td class="type">
</td>
<td class="description last">style</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line151">line 151</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="smul"><span class="type-signature"><static> </span>smul<span class="signature">(Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">s</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line401">line 401</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="ssub"><span class="type-signature"><static> </span>ssub<span class="signature">(Number)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Number</code></td>
<td class="type">
</td>
<td class="description last">s</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line352">line 352</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="sub"><span class="type-signature"><static> </span>sub<span class="signature">(Color)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Color</code></td>
<td class="type">
</td>
<td class="description last">other</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line319">line 319</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
this
</div>
</dd>
<dt>
<h4 class="name" id="toArray"><span class="type-signature"><static> </span>toArray<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line713">line 713</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Array
</div>
</dd>
<dt>
<h4 class="name" id="toHEX"><span class="type-signature"><static> </span>toHEX<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line224">line 224</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="toJSON"><span class="type-signature"><static> </span>toJSON<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line680">line 680</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Object
</div>
</dd>
<dt>
<h4 class="name" id="toRGB"><span class="type-signature"><static> </span>toRGB<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line247">line 247</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Color
</div>
</dd>
<dt>
<h4 class="name" id="toString"><span class="type-signature"><static> </span>toString<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="color.js.html">math/color.js</a>, <a href="color.js.html#line729">line 729</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>