Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In HSV, the hue is defined as</p> <pre><code>H = atan2( sqrt(3)*(G-B), 2R-G-B ) </code></pre> <p>(<a href="http://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma" rel="noreferrer">link</a>). In each of the six sectors (R-Y, Y-G ...), there are equally many hues. Additionally, there are six hues at the boundary between the regions. So, <code>6 + 6 * huesRY</code>.</p> <p>In the red-yellow sector, R > G > B, so both arguments to atan2 are positive.</p> <pre><code> count sqrt(3) * (G-B) / (2R-G-B) =count (G-B) / (2R-G-B) =count (G-B) / ((G-B) + (2R-2G)) </code></pre> <p>since we can apply any linear transformation to the sets of [x,y] and not change the count of its ratios, <code>x / (x+2y) == x / y</code></p> <pre><code>=count (G-B) / (R-G) </code></pre> <p>if we subtract the same value from all R,G,B, the ratio does not change, so assume B=0</p> <pre><code>=count G / (R-G) =count G / R </code></pre> <p>so, there are six times as many hues as there are ratios between two positive integers that are both below 2^8 (assuming 8 bits per channel), and six more. There are as many ratios as there are pairs of coprime positive integers. The number of positive integers below <code>n</code> that are coprime with <code>n</code> is called the Euler's totient function. <a href="http://oeis.org" rel="noreferrer">OEIS</a> <a href="http://oeis.org/A002088/b002088.txt" rel="noreferrer">lists</a> <a href="http://oeis.org/A000010" rel="noreferrer">its</a> <a href="http://oeis.org/A002088" rel="noreferrer">partial sums</a>. There are exactly 19948 pairs of coprime positive integers below 256.</p> <p>6 * 19948 + 6 = 119 694</p> <p><strong>There are exactly 119 694 different hues in the HSV model that correspond to a color in the 8-bit RGB model.</strong> Note that they are not spaced evenly.</p> <p>If 8 bits per channel are used in the HSV model, then there are less colors than in the RGB model with 8 bits per channel simply because some HSV triples map to the same color while every RGB triple defines a different color.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload