12 ms·
> You're likely already familiar and have seen #FFF for white and #000 for black. The actual value of a shorthand code is made by duplicating the digit for each
by saagarjha 8y ago
> You're likely already familiar and have seen #FFF for white and #000 for black. The actual value of a shorthand code is made by duplicating the digit for each channel. So #D92 is technically #DD9922.
Huh, I had always thought that they added a zero, so #D92 would become #D09020. TIL.
- cbsks 8y agoI mistakenly thought that too, but it makes sense. Otherwise #fff would expand to #f0f0f0, which is a light gray, but not quite white.
- aasasd 8y agoThe shorthand pretty much maps a 16-value scale to the same range for each channel, instead of the 256 values.
- baddox 8y agoI think I always knew that it doubled the values, but I only recently realized that #888 isn’t 50%, which would be #808080 (rounded).
- EvilTerran 8y agoConversely, the shorthand scale does divide into perfect thirds (#555, #AAA) or fifths (#333, #666, #999, #CCC).