TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The challenging task of sorting colours – Alan Zucconi

4 pointsby notmysql_almost 2 years ago

2 comments

bratgpttameralmost 2 years ago
Dumb question: how do Adobe, et al. do it when creating the standard color wheel&#x2F;color picker? Would there not be some kind of Levenshteinesque mapping possible, against something like `FlattenedColorLine = Circle2LineProjection(GenerateColorWheel())`? (Is this projection what&#x27;s being accomplished with Hilbert curves?)<p>I recall toying with this problem in my early programming days, when I was just learning about sorting and RGB values. A first-pass solution (RGB?) gave me results like this[1], my least-favorite color-picker UI. I decided that maybe the devs weren&#x27;t stupid and bad after all, and this made sense to someone smarter than me, at least on some level. (I still groan when I see it in the wild, though)<p>How&#x2F;when&#x2F;why did we improve from this layout to the &quot;standard&quot; color-picker interface we see everywhere, like Adobe or a Google search for &quot;color picker&quot;?<p>(ETA: I&#x27;m talking about the awful sort order, not the end of using only &quot;web-safe&quot; colors)<p>[1] <a href="https:&#x2F;&#x2F;shemeerns.gallerycdn.vsassets.io&#x2F;extensions&#x2F;shemeerns&#x2F;colorpicker&#x2F;3.0.4.5&#x2F;1670234719532&#x2F;cP__2.png" rel="nofollow noreferrer">https:&#x2F;&#x2F;shemeerns.gallerycdn.vsassets.io&#x2F;extensions&#x2F;shemeern...</a>
audunwalmost 2 years ago
Before I reached the hilbert curve section my best guess for a visually pleasing sorting would be using a 3D hilbert curve in LAB color space. So I’m very disappointed that the idea wasn’t explored in more depth. Such promising results for 2D curve in RGB space, and it wasn’t even extended to HSV?