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.

Show HN: Distinct Color Palette generator using Red-Yellow-Blue colorspace

18 pointsby friggeriabout 13 years ago

8 comments

MartinCronabout 13 years ago
This is really great. I wound up doing something like this by hand (by eye?) the last time I needed to generate a distinct color palette (player colors in an online map game).
mistercowabout 13 years ago
It would be neat if you could add different color models to optimize for different kinds of color blindness.
评论 #3834518 未加载
dredmorbiusabout 13 years ago
Similar concept: I like to be able to generate terminals of varying-but-viewable color schemes. I'd like to tweak this to use more an HSV than RGB scheme.<p>#!/usr/bin/gawk -f<p>function ranint (x) { return int(rand() * x) } function hex (x) { return sprintf("%02x", x) }<p>BEGIN {<p><pre><code> mc = 96 # max color # Seed RNG using nanoseconds cmd="date +%N" cmd | getline seed close(cmd) srand(seed) r = ranint(mc) g = ranint(mc) b = ranint(mc) printf( "rxvt -bg \x27#%s%s%s\x27 -fg gold -cr blue &#38;\n", hex(r), hex(g), hex(b) ) }</code></pre>
drvabout 13 years ago
The "ceiling" symbols (left/right square bracket upper corner) at the beginning of the explanatory text are displayed as unknown character boxes here (Win7/Chrome).
评论 #3834310 未加载
inconditusabout 13 years ago
What's pretty cool is that if you generate 1000+ the colors begin to become muted and look "foresty". Why's this?
评论 #3834527 未加载
malandrewabout 13 years ago
Why not use CIE L*ab, since that colorimetric system is based on human perception or difference?
jmelloyabout 13 years ago
Neat. By pure happenstance, I needed a bunch of colors for plots and state diagrams yesterday.
guard-of-terraabout 13 years ago
I press the generate button and then nothing happens. Firefox here.
评论 #3834111 未加载