Hacker News new | ask | show | jobs
by voidpointer 3322 days ago
Just out of curiosity... What is the point in testing all 2^24 possible color values?
1 comments

The point is being certain I haven't missed an edge case somewhere.

The hard part is the percentage rgb() values, of which there are technically an uncountably infinite number (since any real number in the range 0-100 is a legal percentage value). For those I generate all 16,777,216 integer values, and verify that converting to percentage and back yields the original value.