Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use the <a href="http://en.wikipedia.org/wiki/Lab_color_space#Advantages_of_Lab" rel="nofollow noreferrer">LAB</a> color space and find the color with the nearest <a href="http://en.wikipedia.org/wiki/Euclidean_distance" rel="nofollow noreferrer">euclidean distance</a>. Doing this in the RGB color space will yield counter-intuitive results. (Or use the <a href="http://130.113.54.154/~monger/hsl-rgb.html" rel="nofollow noreferrer">HSL</a> color space.) </p> <p>So just iterate over each pixel and find the color with the closest distance within the color space you choose. Note that the distance must be computed <strong>circularly</strong> for some color spaces (e.g. those employing <em>hue</em>).</p> <p>(Most color quanization revolves around actually choosing a palette, but that has already been taken care of in your case, so you can't use the more popular quantization techniques.)</p> <p>Also, check out <a href="https://stackoverflow.com/questions/492211/is-there-an-easy-way-to-compare-how-close-two-colors-are-to-each-other">this question</a>.</p> <p>To find the HSB hue in Cocoa, it looks like you can use the <a href="http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html#//apple_ref/occ/instm/NSColor/getHue:saturation:brightness:alpha:" rel="nofollow noreferrer">getHue method declared in NSColor.h</a>.</p> <p><strong>However, if you just convert an image to a cross-stitch design using this technique, it will be very hard to actually stitch it.</strong> It will be full of single-pixel color fields, which sort of defeats the purpose of cross-stitching.</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