News for hackers. Stuff that matters.
Re:Lexadecimal - colour codes with meaning by gjm11 on Thursday May 12, 2011 @10:36AM (#2540694)
Lovely!

I think it would be improved by having a cleverer colour-based sorting algorithm. At the moment, you choose one parameter (H, S or V) to sort by, and the others have no effect at all, and it looks a bit too random.

Here's one toy example of what I think is a more natural-looking order of colours: http://i.imgur.com/xjh97.png (I took red<<1, green<<2 and blue, and interleaved their bits). Better still might be to sort by position along a Hilbert-curve traversal of the RGB cube or HSL space or something, but I couldn't work out how to do that in 5 minutes so didn't bother :-).

Re:Lexadecimal - colour codes with meaning by derefr on Thursday May 12, 2011 @04:43PM (#2542236)
> Better still might be to sort by position along a Hilbert-curve traversal of the RGB cube or HSL space or something

Like this? http://corte.si/posts/code/hilbert/portrait/index.html