mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
95 lines
3.2 KiB
HTML
95 lines
3.2 KiB
HTML
---
|
|
layout: docs
|
|
title: Color
|
|
edit_url: "https://github.com/nylas/N1/blob/master/src/color.coffee"
|
|
---
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<div class="markdown-from-sourecode">
|
|
<p><p>A simple color class returned from <a href='Config.html#get'>Config::get</a> when the value
|
|
at the key path is of type 'color'.</p>
|
|
</p>
|
|
</div>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Class Methods</h3>
|
|
|
|
<h4 id=parse class="function-name">
|
|
parse(<span class="args"><span class="arg">value</span></span>) <a href="#parse" class="link"></a>
|
|
</h4>
|
|
|
|
<div class="function-description markdown-from-sourecode">
|
|
<p><p>Parse a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> or <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object'>Object</a> into a <a href='color.html'>Color</a>.</p>
|
|
</p>
|
|
</div>
|
|
|
|
<strong>Parameters</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Argument</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
<tr>
|
|
<td style="width:15%;">
|
|
<em>value</em>
|
|
</td>
|
|
<td class="markdown-from-sourecode">
|
|
|
|
<p>A <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> such as <code>'white'</code>, <code>#ff00ff</code>, or <code>'rgba(255, 15, 60, .75)'</code> or an <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/object'>Object</a> with <code>red</code>, <code>green</code>, <code>blue</code>, and <code>alpha</code> properties.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<strong>Returns</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Return Values</th>
|
|
</tr>
|
|
<tr><td class="markdown-from-sourecode"><p>Returns a <a href='color.html'>Color</a> or <code>null</code> if it cannot be parsed.</p>
|
|
</td></tr>
|
|
</table>
|
|
|
|
|
|
|
|
<h3>Instance Methods</h3>
|
|
|
|
<h4 id=toHexString class="function-name">
|
|
toHexString(<span class="args"></span>) <a href="#toHexString" class="link"></a>
|
|
</h4>
|
|
|
|
<div class="function-description markdown-from-sourecode">
|
|
<p></p>
|
|
</div>
|
|
|
|
|
|
<strong>Returns</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Return Values</th>
|
|
</tr>
|
|
<tr><td class="markdown-from-sourecode"><p>Returns a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> in the form <code>'#abcdef'</code>.</p>
|
|
</td></tr>
|
|
</table>
|
|
<h4 id=toRGBAString class="function-name">
|
|
toRGBAString(<span class="args"></span>) <a href="#toRGBAString" class="link"></a>
|
|
</h4>
|
|
|
|
<div class="function-description markdown-from-sourecode">
|
|
<p></p>
|
|
</div>
|
|
|
|
|
|
<strong>Returns</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Return Values</th>
|
|
</tr>
|
|
<tr><td class="markdown-from-sourecode"><p>Returns a <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string'>String</a> in the form <code>'rgba(25, 50, 75, .9)'</code>.</p>
|
|
</td></tr>
|
|
</table>
|