<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>colour.models.cie_xyy Module &mdash; Colour 0.3.4 documentation</title>
    
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/bootswatch-3.1.0/colour/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="_static/styles.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.3.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="_static/js/jquery-fix.js"></script>
    <script type="text/javascript" src="_static/bootstrap-3.1.0/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
    <link rel="top" title="Colour 0.3.4 documentation" href="index.html" />
    <link rel="up" title="colour.models Package" href="colour.models.html" />
    <link rel="next" title="colour.models.common Module" href="colour.models.common.html" />
    <link rel="prev" title="colour.models.cie_uvw Module" href="colour.models.cie_uvw.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">

  </head>
  <body>

  <div id="navbar" class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="index.html"><img src="_static/Colour_Logo_Icon_001.png">
          Colour&nbsp;0.3</a>
        <!--<span class="navbar-text navbar-version pull-left"><b>0.3</b></span>-->
      </div>

        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            <li class="divider-vertical"></li>
            
                <li><a href="https://www.colour-science.org">colour-science.org</a></li>
            
              <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-life-ring">&nbsp;Documentation</i><b class="caret"></b></a>
                  <ul class="dropdown-menu">
                      <li>
                          <a href="api.html" class="fa fa-life-ring">&nbsp;API Reference</a>
                      </li>
                      <li>
                          <a href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/colour.ipynb', True)" class="fa fa-book">&nbsp;IPython Notebooks</a>
                      </li>
                      <li>
                          <a href="https://www.colour-science.org/features.php" class="fa fa-lightbulb-o">&nbsp;Features</a>
                      </li>
                      <li>
                          <a href="https://www.colour-science.org/contributing.php"><span class="fa fa-gears">&nbsp;Contributing</span></a>
                      </li>
                  </ul>
              </li>
            
              
                
  <li>
    <a href="colour.models.cie_uvw.html" title="Previous Chapter: colour.models.cie_uvw Module"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; colour.models.ci...</span>
    </a>
  </li>
  <li>
    <a href="colour.models.common.html" title="Next Chapter: colour.models.common Module"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">colour.models.co... &raquo;</span>
    </a>
  </li>
              
            
            
            
            
          </ul>

          
            
<form class="navbar-form navbar-right" action="search.html" method="get">
 <div class="form-group">
  <input type="text" name="q" class="form-control" placeholder="Search" />
 </div>
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
          
        </div>
    </div>
  </div>

<div class="container">
  <div class="row">
    <div class="col-md-12">
      
  <div class="section" id="module-colour.models.cie_xyy">
<span id="colour-models-cie-xyy-module"></span><h1>colour.models.cie_xyy Module<a class="headerlink" href="#module-colour.models.cie_xyy" title="Permalink to this headline">¶</a></h1>
<div class="section" id="cie-xyy-colourspace">
<h2>CIE xyY Colourspace<a class="headerlink" href="#cie-xyy-colourspace" title="Permalink to this headline">¶</a></h2>
<p>Defines the <em>CIE xyY</em> colourspace transformations:</p>
<ul class="simple">
<li><a class="reference internal" href="#colour.models.cie_xyy.XYZ_to_xyY" title="colour.models.cie_xyy.XYZ_to_xyY"><tt class="xref py py-func docutils literal"><span class="pre">XYZ_to_xyY()</span></tt></a></li>
<li><a class="reference internal" href="#colour.models.cie_xyy.xyY_to_XYZ" title="colour.models.cie_xyy.xyY_to_XYZ"><tt class="xref py py-func docutils literal"><span class="pre">xyY_to_XYZ()</span></tt></a></li>
<li><a class="reference internal" href="#colour.models.cie_xyy.xy_to_XYZ" title="colour.models.cie_xyy.xy_to_XYZ"><tt class="xref py py-func docutils literal"><span class="pre">xy_to_XYZ()</span></tt></a></li>
<li><a class="reference internal" href="#colour.models.cie_xyy.XYZ_to_xy" title="colour.models.cie_xyy.XYZ_to_xy"><tt class="xref py py-func docutils literal"><span class="pre">XYZ_to_xy()</span></tt></a></li>
</ul>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference external" href="http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/models/cie_xyy.ipynb">CIE xyY Colourspace IPython Notebook</a></p>
</div>
<p class="rubric">References</p>
<table class="docutils footnote" frame="void" id="id1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[1]</td><td>Wikipedia. (n.d.). CIE 1931 color space. Retrieved February 24, 2014,
from <a class="reference external" href="http://en.wikipedia.org/wiki/CIE_1931_color_space">http://en.wikipedia.org/wiki/CIE_1931_color_space</a></td></tr>
</tbody>
</table>
<dl class="function">
<dt id="colour.models.cie_xyy.XYZ_to_xyY">
<tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">XYZ_to_xyY</tt><big>(</big><em>XYZ</em>, <em>illuminant=(0.34567</em>, <em>0.3585)</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#XYZ_to_xyY"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.XYZ_to_xyY" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts from <em>CIE XYZ</em> colourspace to <em>CIE xyY</em> colourspace and reference
<em>illuminant</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>XYZ</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE XYZ</em> colourspace matrix.</li>
<li><strong>illuminant</strong> (<em>array_like, optional</em>) &#8211; Reference <em>illuminant</em> chromaticity coordinates.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><em>CIE xyY</em> colourspace matrix.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">ndarray, (3,)</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Input <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li>
<li>Output <em>CIE xyY</em> colourspace matrix is in domain [0, 1].</li>
</ul>
<p class="rubric">References</p>
<table class="docutils footnote" frame="void" id="id2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[2]</td><td>Lindbloom, B. (2003). XYZ to xyY. Retrieved February 24, 2014,
from <a class="reference external" href="http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html">http://www.brucelindbloom.com/Eqn_XYZ_to_xyY.html</a></td></tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.07049534</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">,</span> <span class="mf">0.09558313</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ_to_xyY</span><span class="p">(</span><span class="n">XYZ</span><span class="p">)</span>  
<span class="go">array([ 0.2641477...,  0.3777000...,  0.1008    ])</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="colour.models.cie_xyy.xyY_to_XYZ">
<tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">xyY_to_XYZ</tt><big>(</big><em>xyY</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#xyY_to_XYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.xyY_to_XYZ" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts from <em>CIE xyY</em> colourspace to <em>CIE XYZ</em> colourspace.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>xyY</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE xyY</em> colourspace matrix.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><em>CIE XYZ</em> colourspace matrix.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ndarray, (3,)</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Input <em>CIE xyY</em> colourspace matrix is in domain [0, 1].</li>
<li>Output <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li>
</ul>
<p class="rubric">References</p>
<table class="docutils footnote" frame="void" id="id3" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[3]</td><td>Lindbloom, B. (2009). xyY to XYZ. Retrieved February 24, 2014,
from <a class="reference external" href="http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html">http://www.brucelindbloom.com/Eqn_xyY_to_XYZ.html</a></td></tr>
</tbody>
</table>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">xyY</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.26414772</span><span class="p">,</span> <span class="mf">0.37770001</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xyY_to_XYZ</span><span class="p">(</span><span class="n">xyY</span><span class="p">)</span>  
<span class="go">array([ 0.0704953...,  0.1008    ,  0.0955831...])</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="colour.models.cie_xyy.xy_to_XYZ">
<tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">xy_to_XYZ</tt><big>(</big><em>xy</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#xy_to_XYZ"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.xy_to_XYZ" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the <em>CIE XYZ</em> colourspace matrix from given <em>xy</em> chromaticity
coordinates.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>xy</strong> (<em>array_like</em>) &#8211; <em>xy</em> chromaticity coordinates.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><em>CIE XYZ</em> colourspace matrix.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">ndarray, (3,)</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Input <em>xy</em> chromaticity coordinates are in domain [0, 1].</li>
<li>Output <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li>
</ul>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">xy</span> <span class="o">=</span> <span class="p">(</span><span class="mf">0.26414772236966133</span><span class="p">,</span> <span class="mf">0.37770000704815188</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">xy_to_XYZ</span><span class="p">(</span><span class="n">xy</span><span class="p">)</span>  
<span class="go">array([ 0.6993585...,  1.        ,  0.9482453...])</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="colour.models.cie_xyy.XYZ_to_xy">
<tt class="descclassname">colour.models.cie_xyy.</tt><tt class="descname">XYZ_to_xy</tt><big>(</big><em>XYZ</em>, <em>illuminant=(0.34567</em>, <em>0.3585)</em><big>)</big><a class="reference internal" href="_modules/colour/models/cie_xyy.html#XYZ_to_xy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#colour.models.cie_xyy.XYZ_to_xy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the <em>xy</em> chromaticity coordinates from given <em>CIE XYZ</em> colourspace
matrix.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>XYZ</strong> (<em>array_like, (3,)</em>) &#8211; <em>CIE XYZ</em> colourspace matrix.</li>
<li><strong>illuminant</strong> (<em>array_like, optional</em>) &#8211; Reference <em>illuminant</em> chromaticity coordinates.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><em>xy</em> chromaticity coordinates.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">tuple</p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<ul class="simple">
<li>Input <em>CIE XYZ</em> colourspace matrix is in domain [0, 1].</li>
<li>Output <em>xy</em> chromaticity coordinates are in domain [0, 1].</li>
</ul>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mf">0.07049534</span><span class="p">,</span> <span class="mf">0.1008</span><span class="p">,</span> <span class="mf">0.09558313</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">XYZ_to_xy</span><span class="p">(</span><span class="n">XYZ</span><span class="p">)</span>  
<span class="go">(0.2641477..., 0.3777000...)</span>
</pre></div>
</div>
</dd></dl>

</div>
</div>


    </div>
      
  </div>
</div>
<footer class="footer">
  <div class="container">
    <p class="pull-right">
      <a href="#">Back to top</a>
      
    </p>
    <p>
        &copy; Copyright 2013 - 2015, Colour Developers.<br/>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.2.<br/>
    </p>
  </div>
</footer>
  </body>
</html>