Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
How to Generate Random Colors Programmatically
(
ankerl.com
)
6 points
by
Martha_Jackson
on Dec 11, 2009
|
hide
|
past
|
favorite
|
2 comments
Semiapies
on Dec 11, 2009
|
next
[–]
This is a nice article, but the central lesson is that you almost never want
actual
randomness - you want variation within useful limits.
viggity
on Dec 11, 2009
|
prev
[–]
I wrote a short method that when given a background color it will tell you whether or not white or black text will be the most readable. Using this you can still generate saturated colors but still have the text be readable.
You can find it here:
http://blog.nitriq.com/BlackVsWhiteText.aspx
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: