Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > b17ed897c34853a0a39ef25ab5d3af32 > files > 120

python3-pillow-doc-2.6.2-2.mga5.noarch.rpm

<!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/html; charset=utf-8" />
    
    <title>ImageColor Module &mdash; Pillow v2.6.2 (PIL fork)</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.6.2',
        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>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="top" title="Pillow v2.6.2 (PIL fork)" href="../index.html" />
    <link rel="up" title="Reference" href="index.html" />
    <link rel="next" title="ImageCms Module" href="ImageCms.html" />
    <link rel="prev" title="ImageChops (“Channel Operations”) Module" href="ImageChops.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="ImageCms.html" title="ImageCms Module"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="ImageChops.html" title="ImageChops (“Channel Operations”) Module"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Home</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Reference</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-PIL.ImageColor"></span><div class="section" id="imagecolor-module">
<h1><tt class="xref py py-mod docutils literal"><span class="pre">ImageColor</span></tt> Module<a class="headerlink" href="#imagecolor-module" title="Permalink to this headline">¶</a></h1>
<p>The <tt class="xref py py-mod docutils literal"><span class="pre">ImageColor</span></tt> module contains color tables and converters from
CSS3-style color specifiers to RGB tuples. This module is used by
<tt class="xref py py-meth docutils literal"><span class="pre">PIL.Image.Image.new()</span></tt> and the <a class="reference internal" href="ImageDraw.html#module-PIL.ImageDraw" title="PIL.ImageDraw"><tt class="xref py py-mod docutils literal"><span class="pre">ImageDraw</span></tt></a> module, among
others.</p>
<div class="section" id="color-names">
<span id="id1"></span><h2>Color Names<a class="headerlink" href="#color-names" title="Permalink to this headline">¶</a></h2>
<p>The ImageColor module supports the following string formats:</p>
<ul class="simple">
<li>Hexadecimal color specifiers, given as <tt class="docutils literal"><span class="pre">#rgb</span></tt> or <tt class="docutils literal"><span class="pre">#rrggbb</span></tt>. For example,
<tt class="docutils literal"><span class="pre">#ff0000</span></tt> specifies pure red.</li>
<li>RGB functions, given as <tt class="docutils literal"><span class="pre">rgb(red,</span> <span class="pre">green,</span> <span class="pre">blue)</span></tt> where the color values are
integers in the range 0 to 255. Alternatively, the color values can be given
as three percentages (0% to 100%). For example, <tt class="docutils literal"><span class="pre">rgb(255,0,0)</span></tt> and
<tt class="docutils literal"><span class="pre">rgb(100%,0%,0%)</span></tt> both specify pure red.</li>
<li>Hue-Saturation-Lightness (HSL) functions, given as <tt class="docutils literal"><span class="pre">hsl(hue,</span> <span class="pre">saturation%,</span>
<span class="pre">lightness%)</span></tt> where hue is the color given as an angle between 0 and 360
(red=0, green=120, blue=240), saturation is a value between 0% and 100%
(gray=0%, full color=100%), and lightness is a value between 0% and 100%
(black=0%, normal=50%, white=100%). For example, <tt class="docutils literal"><span class="pre">hsl(0,100%,50%)</span></tt> is pure
red.</li>
<li>Common HTML color names. The <a class="reference internal" href="#module-PIL.ImageColor" title="PIL.ImageColor"><tt class="xref py py-mod docutils literal"><span class="pre">ImageColor</span></tt></a> module provides some
140 standard color names, based on the colors supported by the X Window
system and most web browsers. color names are case insensitive. For example,
<tt class="docutils literal"><span class="pre">red</span></tt> and <tt class="docutils literal"><span class="pre">Red</span></tt> both specify pure red.</li>
</ul>
</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">ImageColor</span></tt> Module</a><ul>
<li><a class="reference internal" href="#color-names">Color Names</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
</ul>
</li>
</ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/reference/ImageColor.txt"
           rel="nofollow">Show Source</a></li>
  </ul><h3>Need help?</h3>
<p>
    You can get help via IRC at <a href="irc://irc.freenode.net#pil">irc://irc.freenode.net#pil</a> or Stack Overflow <a href="http://stackoverflow.com/questions/tagged/pillow">here</a> and <a href="http://stackoverflow.com/questions/tagged/pil">here</a>. Please <a href="https://github.com/python-pillow/Pillow/issues/new">report issues on GitHub</a>.
</p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="ImageCms.html" title="ImageCms Module"
             >next</a> |</li>
        <li class="right" >
          <a href="ImageChops.html" title="ImageChops (“Channel Operations”) Module"
             >previous</a> |</li>
        <li><a href="../index.html">Home</a> &raquo;</li>
          <li><a href="index.html" >Reference</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 1997-2011 by Secret Labs AB, 1995-2011 by Fredrik Lundh, 2010-2013 Alex Clark.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>