123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!-- NewPage -->
- <html lang="en">
- <head>
- <!-- Generated by javadoc -->
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>IColorCenter (squidlib-util 3.0.0-SNAPSHOT)</title>
- <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
- <script type="text/javascript" src="../script.js"></script>
- </head>
- <body>
- <script type="text/javascript"><!--
- try {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="IColorCenter (squidlib-util 3.0.0-SNAPSHOT)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6};
- var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
- var altColor = "altColor";
- var rowColor = "rowColor";
- var tableTab = "tableTab";
- var activeTableTab = "activeTableTab";
- </script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- <!-- ========= START OF TOP NAVBAR ======= -->
- <div class="topNav"><a name="navbar.top">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.top.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/IColorCenter.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../deprecated-list.html">Deprecated</a></li>
- <li><a href="../index-files/index-1.html">Index</a></li>
- <li><a href="../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../squidpony/GwtCompatibility.html" title="class in squidpony"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../squidpony/IColorCenter.Skeleton.html" title="class in squidpony"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../index.html?squidpony/IColorCenter.html" target="_top">Frames</a></li>
- <li><a href="IColorCenter.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_top">
- <li><a href="../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_top");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.top">
- <!-- -->
- </a></div>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <!-- ======== START OF CLASS DATA ======== -->
- <div class="header">
- <div class="subTitle">squidpony</div>
- <h2 title="Interface IColorCenter" class="title">Interface IColorCenter<T></h2>
- </div>
- <div class="contentContainer">
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt><span class="paramLabel">Type Parameters:</span></dt>
- <dd><code>T</code> - The concrete type of colors</dd>
- </dl>
- <dl>
- <dt>All Known Implementing Classes:</dt>
- <dd><a href="../squidpony/IColorCenter.Skeleton.html" title="class in squidpony">IColorCenter.Skeleton</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public interface <a href="../src-html/squidpony/IColorCenter.html#line.38">IColorCenter</a><T></pre>
- <div class="block">How to manage colors, making sure that a color is allocated at most once.
-
- <p>
- If you aren't using squidlib's gdx part, you should use this interface (and
- the <a href="../squidpony/IColorCenter.Skeleton.html" title="class in squidpony"><code>IColorCenter.Skeleton</code></a> implementation), because it caches instances.
- </p>
-
- <p>
- If you are using squidlib's gdx part, you should use this interface (and the
- <code>SquidColorCenter</code> implementation) if:
-
- <ul>
- <li>You don't want to use preallocated instances (if you do, check out
- <code>squidpony.squidgrid.gui.Colors</code>)</li>
- <li>You don't want to use named colors (if you do, check out
- <code>com.badlogic.gdx.graphics.Colors</code>)</li>
- <li>You don't like libgdx's Color representation (components as floats
- in-between 0 and 1) but prefer components within 0 (inclusive) and 256
- (exclusive); and don't mind the overhead of switching the representations. My
- personal opinion is that the overhead doesn't matter w.r.t other intensive
- operations that we have in roguelikes (path finding).</li>
- </ul></div>
- <dl>
- <dt><span class="simpleTagLabel">Author:</span></dt>
- <dd>smelC</dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="nested.class.summary">
- <!-- -->
- </a>
- <h3>Nested Class Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
- <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Interface and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>static class </code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.Skeleton.html" title="class in squidpony">IColorCenter.Skeleton</a><<a href="../squidpony/IColorCenter.Skeleton.html" title="type parameter in IColorCenter.Skeleton">T</a>></span></code>
- <div class="block">A skeletal implementation of <a href="../squidpony/IColorCenter.html" title="interface in squidpony"><code>IColorCenter</code></a>.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ========== METHOD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.summary">
- <!-- -->
- </a>
- <h3>Method Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
- <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Method and Description</th>
- </tr>
- <tr id="i0" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#desaturate-T-float-">desaturate</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color,
- float degree)</code>
- <div class="block">Brings a color closer to grayscale by the specified degree and returns the new color (desaturated somewhat).</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#desaturated-T-">desaturated</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color)</code>
- <div class="block">Gets a fully-desaturated version of the given color (keeping its brightness, but making it grayscale).</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/panel/IColoredString.html" title="interface in squidpony.panel">IColoredString</a><<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a>></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#filter-squidpony.panel.IColoredString-">filter</a></span>(<a href="../squidpony/panel/IColoredString.html" title="interface in squidpony.panel">IColoredString</a><<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a>> ics)</code> </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#filter-T-">filter</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#get-int-int-int-">get</a></span>(int red,
- int green,
- int blue)</code> </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#get-int-int-int-int-">get</a></span>(int red,
- int green,
- int blue,
- int opacity)</code> </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getAlpha-T-">getAlpha</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getBlack--">getBlack</a></span>()</code> </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getBlue-T-">getBlue</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getGreen-T-">getGreen</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i10" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getHSV-float-float-float-">getHSV</a></span>(float hue,
- float saturation,
- float value)</code> </td>
- </tr>
- <tr id="i11" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getHSV-float-float-float-float-">getHSV</a></span>(float hue,
- float saturation,
- float value,
- float opacity)</code> </td>
- </tr>
- <tr id="i12" class="altColor">
- <td class="colFirst"><code>float</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getHue-T-">getHue</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i13" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getRandom-squidpony.squidmath.RNG-int-">getRandom</a></span>(<a href="../squidpony/squidmath/RNG.html" title="class in squidpony.squidmath">RNG</a> rng,
- int opacity)</code> </td>
- </tr>
- <tr id="i14" class="altColor">
- <td class="colFirst"><code>int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getRed-T-">getRed</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i15" class="rowColor">
- <td class="colFirst"><code>float</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getSaturation-T-">getSaturation</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i16" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getTransparent--">getTransparent</a></span>()</code> </td>
- </tr>
- <tr id="i17" class="rowColor">
- <td class="colFirst"><code>float</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getValue-T-">getValue</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</code> </td>
- </tr>
- <tr id="i18" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#getWhite--">getWhite</a></span>()</code> </td>
- </tr>
- <tr id="i19" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#greify-T-boolean-">greify</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> t,
- boolean doAlpha)</code>
- <div class="block">Gets a copy of t and modifies it to make a shade of gray with the same brightness.</div>
- </td>
- </tr>
- <tr id="i20" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#lerp-T-T-float-">lerp</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> start,
- <a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> end,
- float change)</code>
- <div class="block">Gets the linear interpolation from Color start to Color end, changing by the fraction given by change.</div>
- </td>
- </tr>
- <tr id="i21" class="rowColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#saturate-T-float-">saturate</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color,
- float degree)</code>
- <div class="block">Saturates color (makes it closer to a vivid color like red or green and less gray) by the specified degree and
- returns the new color (saturated somewhat).</div>
- </td>
- </tr>
- <tr id="i22" class="altColor">
- <td class="colFirst"><code><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../squidpony/IColorCenter.html#saturated-T-">saturated</a></span>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color)</code>
- <div class="block">Fully saturates color (makes it a vivid color like red or green and less gray) and returns the modified copy.</div>
- </td>
- </tr>
- </table>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="get-int-int-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>get</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.55">get</a>(int red,
- int green,
- int blue,
- int opacity)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>red</code> - The red component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dd><code>green</code> - The green component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dd><code>blue</code> - The blue component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dd><code>opacity</code> - The alpha component. In-between 0 (inclusive) and 256
- (exclusive). Larger values mean more opacity; 0 is clear.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A possibly transparent color.</dd>
- </dl>
- </li>
- </ul>
- <a name="get-int-int-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>get</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.69">get</a>(int red,
- int green,
- int blue)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>red</code> - The red component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dd><code>green</code> - The green component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dd><code>blue</code> - The blue component. For screen colors, in-between 0 (inclusive)
- and 256 (exclusive).</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>An opaque color.</dd>
- </dl>
- </li>
- </ul>
- <a name="getHSV-float-float-float-float-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getHSV</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.84">getHSV</a>(float hue,
- float saturation,
- float value,
- float opacity)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>hue</code> - The hue of the desired color from 0.0 (red, inclusive) towards orange, then
- yellow, and eventually to purple before looping back to almost the same red
- (1.0, exclusive)</dd>
- <dd><code>saturation</code> - the saturation of the color from 0.0 (a grayscale color; inclusive)
- to 1.0 (a bright color, exclusive)</dd>
- <dd><code>value</code> - the value (essentially lightness) of the color from 0.0 (black,
- inclusive) to 1.0 (inclusive) for screen colors or arbitrarily high
- for HDR colors.</dd>
- <dd><code>opacity</code> - the alpha component as a float; 0.0f is clear, 1.0f is opaque.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>a possibly transparent color</dd>
- </dl>
- </li>
- </ul>
- <a name="getHSV-float-float-float-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getHSV</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.98">getHSV</a>(float hue,
- float saturation,
- float value)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>hue</code> - The hue of the desired color from 0.0 (red, inclusive) towards orange, then
- yellow, and eventually to purple before looping back to almost the same red
- (1.0, exclusive)</dd>
- <dd><code>saturation</code> - the saturation of the color from 0.0 (a grayscale color; inclusive)
- to 1.0 (a bright color, exclusive)</dd>
- <dd><code>value</code> - the value (essentially lightness) of the color from 0.0 (black,
- inclusive) to 1.0 (inclusive) for screen colors or arbitrarily high
- for HDR colors.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>an opaque color</dd>
- </dl>
- </li>
- </ul>
- <a name="getWhite--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getWhite</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.103">getWhite</a>()</pre>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Opaque white.</dd>
- </dl>
- </li>
- </ul>
- <a name="getBlack--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getBlack</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.108">getBlack</a>()</pre>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>Opaque black.</dd>
- </dl>
- </li>
- </ul>
- <a name="getTransparent--">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getTransparent</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.113">getTransparent</a>()</pre>
- <dl>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The fully transparent color.</dd>
- </dl>
- </li>
- </ul>
- <a name="getRandom-squidpony.squidmath.RNG-int-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getRandom</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.122">getRandom</a>(<a href="../squidpony/squidmath/RNG.html" title="class in squidpony.squidmath">RNG</a> rng,
- int opacity)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>rng</code> - an RNG from SquidLib.</dd>
- <dd><code>opacity</code> - The alpha component. In-between 0 (inclusive) and 256
- (exclusive). Larger values mean more opacity; 0 is clear.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A random color, except for the alpha component.</dd>
- </dl>
- </li>
- </ul>
- <a name="getRed-java.lang.Object-">
- <!-- -->
- </a><a name="getRed-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getRed</h4>
- <pre>int <a href="../src-html/squidpony/IColorCenter.html#line.128">getRed</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The red component. For screen colors, in-between 0 (inclusive) and 256 (exclusive).</dd>
- </dl>
- </li>
- </ul>
- <a name="getGreen-java.lang.Object-">
- <!-- -->
- </a><a name="getGreen-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getGreen</h4>
- <pre>int <a href="../src-html/squidpony/IColorCenter.html#line.135">getGreen</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The green component. For screen colors, in-between 0 (inclusive) and 256
- (exclusive).</dd>
- </dl>
- </li>
- </ul>
- <a name="getBlue-java.lang.Object-">
- <!-- -->
- </a><a name="getBlue-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getBlue</h4>
- <pre>int <a href="../src-html/squidpony/IColorCenter.html#line.141">getBlue</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The blue component. For screen colors, in-between 0 (inclusive) and 256 (exclusive).</dd>
- </dl>
- </li>
- </ul>
- <a name="getAlpha-java.lang.Object-">
- <!-- -->
- </a><a name="getAlpha-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getAlpha</h4>
- <pre>int <a href="../src-html/squidpony/IColorCenter.html#line.148">getAlpha</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The alpha component. In-between 0 (inclusive) and 256
- (exclusive).</dd>
- </dl>
- </li>
- </ul>
- <a name="getHue-java.lang.Object-">
- <!-- -->
- </a><a name="getHue-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getHue</h4>
- <pre>float <a href="../src-html/squidpony/IColorCenter.html#line.156">getHue</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The hue of the color from 0.0 (red, inclusive) towards orange, then yellow, and
- eventually to purple before looping back to almost the same red (1.0, exclusive)</dd>
- </dl>
- </li>
- </ul>
- <a name="getSaturation-java.lang.Object-">
- <!-- -->
- </a><a name="getSaturation-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getSaturation</h4>
- <pre>float <a href="../src-html/squidpony/IColorCenter.html#line.164">getSaturation</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the saturation of the color from 0.0 (a grayscale color; inclusive) to 1.0 (a
- bright color, exclusive)</dd>
- </dl>
- </li>
- </ul>
- <a name="getValue-java.lang.Object-">
- <!-- -->
- </a><a name="getValue-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getValue</h4>
- <pre>float <a href="../src-html/squidpony/IColorCenter.html#line.172">getValue</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - a concrete color</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the value (essentially lightness) of the color from 0.0 (black, inclusive) to
- 1.0 (inclusive) for screen colors or arbitrarily high for HDR colors.</dd>
- </dl>
- </li>
- </ul>
- <a name="filter-java.lang.Object-">
- <!-- -->
- </a><a name="filter-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>filter</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.178">filter</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> c)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>c</code> - </dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>The color that <code>this</code> shows when <code>c</code> is requested. May be <code>c</code> itself.</dd>
- </dl>
- </li>
- </ul>
- <a name="filter-squidpony.panel.IColoredString-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>filter</h4>
- <pre><a href="../squidpony/panel/IColoredString.html" title="interface in squidpony.panel">IColoredString</a><<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a>> <a href="../src-html/squidpony/IColorCenter.html#line.185">filter</a>(<a href="../squidpony/panel/IColoredString.html" title="interface in squidpony.panel">IColoredString</a><<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a>> ics)</pre>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>ics</code> - </dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd><code>ics</code> filtered according to <a href="../squidpony/IColorCenter.html#filter-T-"><code>filter(Object)</code></a>. May be
- <code>ics</code> itself if unchanged.</dd>
- </dl>
- </li>
- </ul>
- <a name="greify-java.lang.Object-boolean-">
- <!-- -->
- </a><a name="greify-T-boolean-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>greify</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.197">greify</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> t,
- boolean doAlpha)</pre>
- <div class="block">Gets a copy of t and modifies it to make a shade of gray with the same brightness.
- The doAlpha parameter causes the alpha to be considered in the calculation of brightness and also changes the
- returned alpha of the color.
- Not related to reified types or any usage of "reify."</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>t</code> - a T to copy; only the copy will be modified</dd>
- <dd><code>doAlpha</code> - Whether to include (and hereby change) the alpha component.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A monochromatic variation of <code>t</code>.</dd>
- </dl>
- </li>
- </ul>
- <a name="lerp-java.lang.Object-java.lang.Object-float-">
- <!-- -->
- </a><a name="lerp-T-T-float-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>lerp</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.206">lerp</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> start,
- <a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> end,
- float change)</pre>
- <div class="block">Gets the linear interpolation from Color start to Color end, changing by the fraction given by change.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>start</code> - the initial color T</dd>
- <dd><code>end</code> - the "target" color T</dd>
- <dd><code>change</code> - the degree to change closer to end; a change of 0.0f produces start, 1.0f produces end</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>a new T between start and end</dd>
- </dl>
- </li>
- </ul>
- <a name="desaturated-java.lang.Object-">
- <!-- -->
- </a><a name="desaturated-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>desaturated</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.214">desaturated</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color)</pre>
- <div class="block">Gets a fully-desaturated version of the given color (keeping its brightness, but making it grayscale).
- Keeps alpha the same; if you want alpha to be considered (and brightness to be calculated differently), then
- you can use greify() in this class instead.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>color</code> - the color T to desaturate (will not be modified)</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the grayscale version of color</dd>
- </dl>
- </li>
- </ul>
- <a name="desaturate-java.lang.Object-float-">
- <!-- -->
- </a><a name="desaturate-T-float-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>desaturate</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.223">desaturate</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color,
- float degree)</pre>
- <div class="block">Brings a color closer to grayscale by the specified degree and returns the new color (desaturated somewhat).
- Alpha is left unchanged.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>color</code> - the color T to desaturate</dd>
- <dd><code>degree</code> - a float between 0.0f and 1.0f; more makes it less colorful</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the desaturated (and if a filter is used, also filtered) new color T</dd>
- </dl>
- </li>
- </ul>
- <a name="saturated-java.lang.Object-">
- <!-- -->
- </a><a name="saturated-T-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>saturated</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.231">saturated</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color)</pre>
- <div class="block">Fully saturates color (makes it a vivid color like red or green and less gray) and returns the modified copy.
- Leaves alpha unchanged.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>color</code> - the color T to saturate (will not be modified)</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the saturated version of color</dd>
- </dl>
- </li>
- </ul>
- <a name="saturate-java.lang.Object-float-">
- <!-- -->
- </a><a name="saturate-T-float-">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>saturate</h4>
- <pre><a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> <a href="../src-html/squidpony/IColorCenter.html#line.242">saturate</a>(<a href="../squidpony/IColorCenter.html" title="type parameter in IColorCenter">T</a> color,
- float degree)</pre>
- <div class="block">Saturates color (makes it closer to a vivid color like red or green and less gray) by the specified degree and
- returns the new color (saturated somewhat). If this is called on a color that is very close to gray, this does
- not necessarily return a specific color, but most implementations will treat a hue of 0 as red.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>color</code> - the color T to saturate</dd>
- <dd><code>degree</code> - a float between 0.0f and 1.0f; more makes it more colorful</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the saturated (and if a filter is used, also filtered) new color</dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <!-- ========= END OF CLASS DATA ========= -->
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <div class="bottomNav"><a name="navbar.bottom">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.bottom.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/IColorCenter.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../deprecated-list.html">Deprecated</a></li>
- <li><a href="../index-files/index-1.html">Index</a></li>
- <li><a href="../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../squidpony/GwtCompatibility.html" title="class in squidpony"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../squidpony/IColorCenter.Skeleton.html" title="class in squidpony"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../index.html?squidpony/IColorCenter.html" target="_top">Frames</a></li>
- <li><a href="IColorCenter.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_bottom">
- <li><a href="../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_bottom");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li><a href="#nested.class.summary">Nested</a> | </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li>Field | </li>
- <li>Constr | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <p class="legalCopy"><small>Copyright © 2012–2016. All rights reserved.</small></p>
- </body>
- </html>
|