{"id":1376,"date":"2011-08-15T16:00:17","date_gmt":"2011-08-15T23:00:17","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=1376"},"modified":"2011-08-10T11:36:20","modified_gmt":"2011-08-10T18:36:20","slug":"perceptual-colour-space-update","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/perceptual-colour-space-update\/","title":{"rendered":"Perceptual colour space update"},"content":{"rendered":"<p>Last year, I wrote about some code I had written to find <a href=\"https:\/\/www.reenigne.org\/blog\/most-different-colours\">maximally distributed sets of colours<\/a> in perceptual colour space. I was having some problems with the code at the time, but since then I have got it working. I fixed it by only repelling each particle from the nearest one to it - then particles quickly settle into the points where they are equidistant from the nearest particles on each side.<\/p>\n<p>Here are the colours it came up with in LUV space:<\/p>\n<p>  <span style='background-color: #ff00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #0000ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff5e00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #400000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #2400ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #410047'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0071ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ecee'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffe58b'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #005fff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00d7'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff7700'>&nbsp;&nbsp;<\/span>  <span style='background-color: #10ffff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #f2ff00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #960000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0027e7'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00e2'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fdc700'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff90'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffffff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0069ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0078'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00a400'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffb000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffcfff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #002200'>&nbsp;&nbsp;<\/span>  <span style='background-color: #800000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0027ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fb00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00e700'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00e8ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffc3ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffffb9'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #002900'>&nbsp;&nbsp;<\/span>  <span style='background-color: #740000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0066ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #e300ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00b4'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00c100'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00e7ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffbdff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffffce'>&nbsp;&nbsp;<\/span><\/p>\n<p>And here are the colours it came up with in LAB space:<\/p>\n<p>  <span style='background-color: #0000ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #0078ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff8f'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #0000f8'>&nbsp;&nbsp;<\/span>  <span style='background-color: #b80000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00d0ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00fd00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #2e0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0071ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffb300'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff19'>&nbsp;&nbsp;<\/span>  <span style='background-color: #95fffc'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0075ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #f9008a'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fc8900'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ef00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fcffff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #001ffe'>&nbsp;&nbsp;<\/span>  <span style='background-color: #f50033'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00c8aa'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffb6ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffca0e'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #00002d'>&nbsp;&nbsp;<\/span>  <span style='background-color: #004c00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0000ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #9e0000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff86f9'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffd500'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff22'>&nbsp;&nbsp;<\/span>  <span style='background-color: #dcffff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0000cd'>&nbsp;&nbsp;<\/span>  <span style='background-color: #006800'>&nbsp;&nbsp;<\/span>  <span style='background-color: #b70039'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00bcff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff9c00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff8eff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffffd0'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #000000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00006a'>&nbsp;&nbsp;<\/span>  <span style='background-color: #9c000d'>&nbsp;&nbsp;<\/span>  <span style='background-color: #006900'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fd00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00beff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff92d0'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffae00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ffffd2'>&nbsp;&nbsp;<\/span><\/p>\n<p>I also did a variation where it just chooses a different hue for each colour, maximizing the saturation (so arranging colours in a ring, rather than throughout a volume) - this is the LAB version but the LUV version is very similar:<\/p>\n<p>  <span style='background-color: #c8ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #3600ff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #00ff0e'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0005ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff001c'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ff3000'>&nbsp;&nbsp;<\/span>  <span style='background-color: #16ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ceff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0000ff'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ffa500'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff42'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00d4ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0500ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff008f'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ff5d00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #f4ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffd2'>&nbsp;&nbsp;<\/span>  <span style='background-color: #009bff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0a00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00a7'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ffce00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #12ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffda'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00a0ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #002dff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00ab'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff000b'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ff9400'>&nbsp;&nbsp;<\/span>  <span style='background-color: #e0ff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffa2'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00dbff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #007dff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0800ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00d6'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0056'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ff8300'>&nbsp;&nbsp;<\/span>  <span style='background-color: #fff600'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff03'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffb8'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00d1ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #007aff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #3a00ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00d7'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff005e'>&nbsp;&nbsp;<\/span><\/p>\n<p>  <span style='background-color: #ffa100'>&nbsp;&nbsp;<\/span>  <span style='background-color: #eaff00'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ff6a'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00ffe0'>&nbsp;&nbsp;<\/span>  <span style='background-color: #00beff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0070ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #0007ff'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff00f2'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0081'>&nbsp;&nbsp;<\/span>  <span style='background-color: #ff0012'>&nbsp;&nbsp;<\/span><\/p>\n<p>I want to do a little flash applet so you can see how the colour particles repel and rotate them around in 3D space - it's a very good way to visualize the perceptual colour solids.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year, I wrote about some code I had written to find maximally distributed sets of colours in perceptual colour space. I was having some problems with the code at the time, but since then I have got it working. I fixed it by only repelling each particle from the nearest one to it - [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,4],"tags":[],"class_list":["post-1376","post","type-post","status-publish","format-standard","hentry","category-colour","category-computer"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1376","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=1376"}],"version-history":[{"count":3,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1376\/revisions"}],"predecessor-version":[{"id":1378,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1376\/revisions\/1378"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=1376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=1376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=1376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}