TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The challenging task of sorting colours – Alan Zucconi

4 点作者 notmysql_将近 2 年前

2 条评论

bratgpttamer将近 2 年前
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>
audunw将近 2 年前
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?