5 ms·
Hmm. I've always wanted to parse colours in my head. How do you do that?
by nsomaru 9y ago
Hmm. I've always wanted to parse colours in my head.
How do you do that?
- JoshTriplett 9y agoHex colors are RRGGBB; if you look at C0FFEE, you can see that it's all-green, almost-all-blue, and significantly less red. So it's going to be a near-white color that's green/blue.
- dyarosla 9y agoYou would recognize how 00 through FF indicates more/less presence of each of rgb for every two characters, and combine from there. IE ff0000 would mean fully red no green no blue. It takes some practice to remember how the different combinations add up.
- LeonM 9y agoThese CSS colors consist of 3 bytes in hex, the first gives the red value, second green and the last is blue. So: #FF0000 = 0xFF, 0x00, 0x00, which is pure red #0000FF = 0x00, 0x00, 0xFF, which is pure blue #FF00FF = 0xFF, 0x00, 0xFF, which is red and blue mixed, so it's purple (violet) #FFFFFF = 0xFF, 0xFF, 0xFF, all colors combined is white etc #C0FFEE = 0xC0, 0xFF, 0xEE, so by 'parsing' it in your head yo can see is mostly green and blue, combined that's cyan.
- Theodores 9y agoYes but you grew up typing hex codes into a home computer connected to a tape drive. You know what 8192 looks like in binary but everything beyond 65535 you struggle with because you didn't have the registers for that on your 6502A. It probably irritates you to see images scaled to 1000 pixels rather than 1024. What about that jpeg cell that is not 8 pixels square? Think of the computational overhead and the need to go floating point just because someone does not think in bytes. It is too late to tell them now, these kids ain't spending winter typing in hex. Hex to them is like BCD is to you and who needs binary coded decimal these days when emoji's need to be mastered? I don't mean you personally, just them folk that know their hex from learning to code that way. I think hex is important but it seems most front end developers would prefer not to know.
- WrtCdEvrydy 9y ago> I think <INSERT_THING_HERE> is important but it seems most front end developers would prefer not to know. This is my experience. There are two types of people in this industry, people who want to make money quick and those who are technologists.
- ovao 9y agoWhat would you guess is the ratio of each?
- WrtCdEvrydy 9y agoIn my experience, I tend to think it's something like 30% technologists, 70% money makers. Unfortunately, barely anyone (including myself) wants to see themselves as the second group (for the record, I think I'm on the second group).
- devdad 9y agoI disagree. Not wanting to learn hex does not make you less of a techie. One can only focus on so much, and tech is huge.
- cyphar 9y agoIn Australia you learn about base-N numbers in primary school, I don't understand why you see that as a huge undertaking. Ultimately if you ever have to check the mode of a file on *nix, or interact with bitmasks in any way, you're going to run into numbers in different bases. Not to mention memory addresses when debugging. I mean, it's not _mandatory_ but it's something you'll run into eventually (though since I do quite low level systems programming, I expect that I see hex a lot more often than web developers -- though CSS colours are also in hex).
- osandov 9y agoFile modes are typically written in octal, not hex.
- wruza 9y agoAlso that it is bright and somewhat unsaturated, because its lowest component is 3/4 of full intensity.
- deleted 9y ago[deleted]