6 ms·
Just out of curiosity... What is the point in testing all 2^24 possible color values?
by voidpointer 9y ago
Just out of curiosity... What is the point in testing all 2^24 possible color values?
- ubernostrum 9y agoThe 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.