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 Code Side Of Color

115 pointsby mmackhover 12 years ago

7 comments

unwindover 12 years ago
Bleh, it seems they forgot to proof this or have it read by someone who ... I don't know, maybe knows a bit more about how it really works.<p><i>When computers name a color, they use a so-called hexidecimal code that most humans gloss over: 24-bit colors. That is, 16,777,216 unique combinations of exactly seven characters made from ten numerals and six letters — preceded by a hash mark.</i><p>I mean, "hexidecimal" is hopefully just a typo, but the "explanation" in the second sentence is off by one, it's not seven characters that make up the color, since the hash mark is constant and doesn't contribute. I would object to the "ten numerals and six letters" too, but I guess that's a suitable popular nomenclature.<p>And I don't even have a lawn ...
评论 #4612767 未加载
评论 #4612807 未加载
评论 #4614212 未加载
评论 #4614851 未加载
评论 #4613042 未加载
cdawzrdover 12 years ago
I'm all for designers learning a bit of the technical background behind colors on the web, but this article is full of technical inaccuracies, misconceptions, and misleading comparisons.<p>"Tens place"? "24-bit color" ignores alpha and color palettes "# means 'This is a hex number'": No, it means a web color expressed as 3 hex numbers.<p>Plus, I know it looks better to make your colors less saturated, but when you are demonstrating starting from #ff0000 and adding other colors, why not actually display #ff0000 instead of #e93f32?<p>Finally, spellcheck.
评论 #4613193 未加载
lenkiteover 12 years ago
I found this article useful despite its errors. However, this article only reinforces my belief that it is easier to work with the HSL color notation. Young(Yello-60degree) Guys (Green-120) Can (Cyan-180) Be (Blue-240) Messy (Magenta-210) Rascals (Red-0/360) gives the visualization for hue. Saturation is between 0-100, where 0 is grayed out and 100 is full-hue. Lightness varies from 0-100, where 0 is blacked out, 100 is whited-out and 50 would give the color as-is.
tharris0101over 12 years ago
As someone who is colorblind, a lot of my design is based on the logic behind colors rather than looks. Of course, I always let an actual designer approve, tinker with, or redo my work. There are a lot of inaccuracies in this piece but I like the gist of it.
评论 #4613171 未加载
dphnxover 12 years ago
It’s a good explanation of how hex colour codes work, but in this day and age it's so much simpler to use (and think in) rgb(n, n, n) notation. Not to mention the hsl(n, n%, n%) notation that is supported by modern browsers.
评论 #4612830 未加载
brianfryerover 12 years ago
Excellent read. I've been interested in developing some sort of tool to help me select, save, and organize colors for custom palettes.<p>This will definitely help -- thanks!
评论 #4613026 未加载
NelsonMinarover 12 years ago
Trying to work with color in RGB triplets is like trying to assemble furniture with a plastic fork. Any discussion of color for programmers needs to be in terms of HSL, with a discussion of Lab for completeness and RGB for dealing with legacy systems.
评论 #4614277 未加载
评论 #4613205 未加载