structhueplusplus_1_1_r_g_b.html 19.9 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hueplusplus: hueplusplus::RGB Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hueplusplus
   &#160;<span id="projectnumber">1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehueplusplus.html">hueplusplus</a></li><li class="navelem"><a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structhueplusplus_1_1_r_g_b-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">hueplusplus::RGB Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Color in <a class="el" href="structhueplusplus_1_1_r_g_b.html" title="Color in RGB. ">RGB</a>.  
 <a href="structhueplusplus_1_1_r_g_b.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_color_units_8h_source.html">hueplusplus/ColorUnits.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3be869fdba2541480c82c737219c7bb0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a3be869fdba2541480c82c737219c7bb0">operator==</a> (const <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> &amp;other) const</td></tr>
<tr class="separator:a3be869fdba2541480c82c737219c7bb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1f826ed16cf47438b772b3e7323eef5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#ab1f826ed16cf47438b772b3e7323eef5">operator!=</a> (const <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> &amp;other) const</td></tr>
<tr class="separator:ab1f826ed16cf47438b772b3e7323eef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97181e813bb57e23bf9c5d79229b2410"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a97181e813bb57e23bf9c5d79229b2410">toXY</a> () const</td></tr>
<tr class="memdesc:a97181e813bb57e23bf9c5d79229b2410"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert to <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> without clamping.  <a href="#a97181e813bb57e23bf9c5d79229b2410">More...</a><br /></td></tr>
<tr class="separator:a97181e813bb57e23bf9c5d79229b2410"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a384635c77e3da12fe5c602d1a5bf1338"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a384635c77e3da12fe5c602d1a5bf1338">toXY</a> (const <a class="el" href="structhueplusplus_1_1_color_gamut.html">ColorGamut</a> &amp;gamut) const</td></tr>
<tr class="memdesc:a384635c77e3da12fe5c602d1a5bf1338"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert to <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> and clip to <code>gamut</code>.  <a href="#a384635c77e3da12fe5c602d1a5bf1338">More...</a><br /></td></tr>
<tr class="separator:a384635c77e3da12fe5c602d1a5bf1338"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5a76e5318658273c774bbeb009e3bd8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structhueplusplus_1_1_hue_saturation.html">HueSaturation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#ae5a76e5318658273c774bbeb009e3bd8">toHueSaturation</a> () const</td></tr>
<tr class="memdesc:ae5a76e5318658273c774bbeb009e3bd8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert to <a class="el" href="structhueplusplus_1_1_hue_saturation.html" title="Color in hue and saturation. ">HueSaturation</a>.  <a href="#ae5a76e5318658273c774bbeb009e3bd8">More...</a><br /></td></tr>
<tr class="separator:ae5a76e5318658273c774bbeb009e3bd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a9093468df3cd85942062efa3ea3f121a"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a9093468df3cd85942062efa3ea3f121a">fromXY</a> (const <a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> &amp;xy)</td></tr>
<tr class="memdesc:a9093468df3cd85942062efa3ea3f121a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create from <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a>.  <a href="#a9093468df3cd85942062efa3ea3f121a">More...</a><br /></td></tr>
<tr class="separator:a9093468df3cd85942062efa3ea3f121a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e0ae706b310640dd2640c03a0308fe4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a2e0ae706b310640dd2640c03a0308fe4">fromXY</a> (const <a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> &amp;xy, const <a class="el" href="structhueplusplus_1_1_color_gamut.html">ColorGamut</a> &amp;gamut)</td></tr>
<tr class="memdesc:a2e0ae706b310640dd2640c03a0308fe4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create from <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> and clip to <code>gamut</code>.  <a href="#a2e0ae706b310640dd2640c03a0308fe4">More...</a><br /></td></tr>
<tr class="separator:a2e0ae706b310640dd2640c03a0308fe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:afc66e05c1083719bd965df87ad2a2eea"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#afc66e05c1083719bd965df87ad2a2eea">r</a></td></tr>
<tr class="memdesc:afc66e05c1083719bd965df87ad2a2eea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Red amount from 0 to 255.  <a href="#afc66e05c1083719bd965df87ad2a2eea">More...</a><br /></td></tr>
<tr class="separator:afc66e05c1083719bd965df87ad2a2eea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33f1e36fbdc5531fd94055729d61624d"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a33f1e36fbdc5531fd94055729d61624d">g</a></td></tr>
<tr class="memdesc:a33f1e36fbdc5531fd94055729d61624d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Green amount from 0 to 255.  <a href="#a33f1e36fbdc5531fd94055729d61624d">More...</a><br /></td></tr>
<tr class="separator:a33f1e36fbdc5531fd94055729d61624d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f0452178ad85616ff065cf56915b6f4"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structhueplusplus_1_1_r_g_b.html#a7f0452178ad85616ff065cf56915b6f4">b</a></td></tr>
<tr class="memdesc:a7f0452178ad85616ff065cf56915b6f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blue amount from 0 to 255.  <a href="#a7f0452178ad85616ff065cf56915b6f4">More...</a><br /></td></tr>
<tr class="separator:a7f0452178ad85616ff065cf56915b6f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Color in <a class="el" href="structhueplusplus_1_1_r_g_b.html" title="Color in RGB. ">RGB</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a9093468df3cd85942062efa3ea3f121a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9093468df3cd85942062efa3ea3f121a">&#9670;&nbsp;</a></span>fromXY() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> hueplusplus::RGB::fromXY </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> &amp;&#160;</td>
          <td class="paramname"><em>xy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create from <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a>. </p>
<p>Performs gamma correction so the light color matches the screen color better. </p><dl class="section note"><dt>Note</dt><dd>The conversion formula is not exact, it can be off by up to 9 for each channel. This is because the color luminosity is not saved. </dd></dl>

</div>
</div>
<a id="a2e0ae706b310640dd2640c03a0308fe4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e0ae706b310640dd2640c03a0308fe4">&#9670;&nbsp;</a></span>fromXY() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> hueplusplus::RGB::fromXY </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> &amp;&#160;</td>
          <td class="paramname"><em>xy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_color_gamut.html">ColorGamut</a> &amp;&#160;</td>
          <td class="paramname"><em>gamut</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create from <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> and clip to <code>gamut</code>. </p>
<p>A light may have <a class="el" href="structhueplusplus_1_1_x_y.html" title="Color in CIE x and y coordinates. ">XY</a> set out of its range. Then this function returns the actual color the light shows rather than what it is set to. Performs gamma correction so the light color matches the screen color better. </p><dl class="section note"><dt>Note</dt><dd>The conversion formula is not exact, it can be off by up to 9 for each channel. This is because the color luminosity is not saved. </dd></dl>

</div>
</div>
<a id="ab1f826ed16cf47438b772b3e7323eef5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1f826ed16cf47438b772b3e7323eef5">&#9670;&nbsp;</a></span>operator!=()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool hueplusplus::RGB::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a3be869fdba2541480c82c737219c7bb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3be869fdba2541480c82c737219c7bb0">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool hueplusplus::RGB::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_r_g_b.html">RGB</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ae5a76e5318658273c774bbeb009e3bd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5a76e5318658273c774bbeb009e3bd8">&#9670;&nbsp;</a></span>toHueSaturation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structhueplusplus_1_1_hue_saturation.html">HueSaturation</a> hueplusplus::RGB::toHueSaturation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert to <a class="el" href="structhueplusplus_1_1_hue_saturation.html" title="Color in hue and saturation. ">HueSaturation</a>. </p>
<p>To get the correct color, set brightness to max(r,g,b). </p>

</div>
</div>
<a id="a97181e813bb57e23bf9c5d79229b2410"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97181e813bb57e23bf9c5d79229b2410">&#9670;&nbsp;</a></span>toXY() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> hueplusplus::RGB::toXY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert to <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> without clamping. </p>
<p>Performs gamma correction so the light color matches the screen color better. </p>

</div>
</div>
<a id="a384635c77e3da12fe5c602d1a5bf1338"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a384635c77e3da12fe5c602d1a5bf1338">&#9670;&nbsp;</a></span>toXY() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structhueplusplus_1_1_x_y_brightness.html">XYBrightness</a> hueplusplus::RGB::toXY </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structhueplusplus_1_1_color_gamut.html">ColorGamut</a> &amp;&#160;</td>
          <td class="paramname"><em>gamut</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert to <a class="el" href="structhueplusplus_1_1_x_y_brightness.html" title="Color and brightness in CIE. ">XYBrightness</a> and clip to <code>gamut</code>. </p>
<p>Performs gamma correction so the light color matches the screen color better. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a7f0452178ad85616ff065cf56915b6f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f0452178ad85616ff065cf56915b6f4">&#9670;&nbsp;</a></span>b</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t hueplusplus::RGB::b</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Blue amount from 0 to 255. </p>

</div>
</div>
<a id="a33f1e36fbdc5531fd94055729d61624d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33f1e36fbdc5531fd94055729d61624d">&#9670;&nbsp;</a></span>g</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t hueplusplus::RGB::g</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Green amount from 0 to 255. </p>

</div>
</div>
<a id="afc66e05c1083719bd965df87ad2a2eea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc66e05c1083719bd965df87ad2a2eea">&#9670;&nbsp;</a></span>r</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t hueplusplus::RGB::r</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Red amount from 0 to 255. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>include/hueplusplus/<a class="el" href="_color_units_8h_source.html">ColorUnits.h</a></li>
<li>src/<a class="el" href="_color_units_8cpp.html">ColorUnits.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>