Why your PC only has sixteen colors
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Hall, Jim
Your computer only supports 16 text colors, and 8 background colors. Why so few colors? And why is there a "Bright Black"? This fun lightning talk will explain the origins of these 16 colors, and why the colors look the way they do.
 Hi everyone, I'm Jim Hall and thanks for attending my lightning talk about why your PC only has 16 colors and why is there a bright black anyway? So as I said, I'm Jim Hall and I've done a number of things in open source software, but one thing you might know me from is the founder and project coordinator of the Fridos project. Now if you've ever booted Fridos or any other operating system into plain text mode, you probably notice you only have these 16 text colors. I am talking only about text in this case. You're getting these 16 text foreground colors and actually only eight text background colors. Why only 16? Why only eight? And why are they called black, blue, green, cyan, red, magenta, brown and white? Where do those color names come from? Well, like many things in technology, it really comes down to compatibility. And with text color, it actually goes back to compatibility with the original IBM PC released in 1981, the IBM personal computer 5150 and actually specifically the IBM color graphics adapter, the IBM CGA. All the decisions about text color that you see today in 2021 actually date back to 1981 and the original IBM CGA. So to talk about color, let me briefly talk here about binary. So as you might know, binary is just a series of things that are on or off. It's like a light bulb. It's either on or it's off. And PCs, certainly retro PCs like to think in a series of eight things that are on or off. Each thing that's on or off is called a bit. And when they're eight altogether, that's called a bite. And so here I've represented these four different numbers using light bulbs or using little circles showing the numbers one, two, three and four. So the number one is just a series of off plus on in the one position. Two is a series of off plus an on in the two position and an off in the one position. If I have an on in both one and two, well, one plus two is three. And then at the bottom row, you can see it's a series of zeros except of an on in the four position. So that's how we can count in binary. You can count all the way up to 255 using binary in an eight-bit system. Of course, we don't actually represent binary using little light bulbs anymore. We actually just use the numbers one and zero to represent on and off. And so here I've got those same numbers, one, two, three and four represented in binary using zeros and ones. And that's really all you need to kind of understand why color looks the way it does. So let's talk about color. So I can take color and represent it as three different light colors, red, green and blue. And if I mix those, I can actually get a variety of different colors, right? So if I have red, green and blue all happening at the same time, I get white. And if I have all of them turned off, of course, I get black. And I can mix any two colors to get a variety of other colors as well. And in fact, if you look back on the original IBM CGA and the original IBM color display, each pixel was actually a series of red, green and blue dots. They were just so close together. They just looked like a single dot. And so you can see I've drawn a little square around each pixel that would have been on the screen. So again, every color was being represented as a mix of red, green and blue. Well, if it's red, green and blue, and I have them on or off, well, I can represent that through binary. It's either on or it's off. And so red, green, blue, RGB, I'm going to represent that as binary. And so each one of these binary numbers is really R, G and B. And that's why if I have 001, that means only blue is turned on. So I get a blue color. And if I have 100, that means I've only got red turned on and I get a red color. And if I have 101, that means I've only got red and blue turned on and I get sort of a magenta color. And if I have all of them turned on, 111, I get full white. And if they're all turned off, of course, I get black. So that's a great way. I can actually get eight colors. I can get zero to seven. I can get black to white. Well, IBM engineers were smart and they realized we can actually add an extra bit and we can double the colors. And so that's what they did. They added an extra bit. And so the rule was is that now we don't have just RGB. We have I RGB because the left bit now is an intensity. And so if I have the intensity turned on with a one on the right-hand side, you can see that those colors of 1,000 to 1,111, those are all bright colors. And so I've got bright black to bright white. And if I have the intensity turned off, so I've got zero, like I've got 0,000 or 0,111, well, I'm going to display the color at, let's say, some half intensity, some half bright intensity. That gives me just regular black through white. And that gives me now 16 colors. And I can probably stop here. Oh, wait a second. I actually don't have 16 colors because black and bright black are actually the same color because I don't have red, green, or blue turned on at all. So OK, we can fix this. We can do an adjustment. So we're going to modify that IRGB. And we're going to say if it's low intensity, if that intensity bit is turned off, it's set to zero, then certainly if any of the bits in RGB are set to zero, it's going to be off. But if it's set to one, I'm going to set that to like a two-thirds brightness with the intensity turned on. So it's a one in that leftmost bit position, then for any zeros in red, green, and blue, I'm actually going to turn that to a one-third intensity and any ones in RGB. I'm going to set that color to be a full brightness. And so that means that now I've got these 16 actual colors from on the left, black to white, and on the right-hand side, I've got bright black to bright white. And by the way, that is why you have bright black. And so now I've got all the colors that I need. I've got all the colors of the rainbow, except, oh, wait a minute, I actually don't have all the colors of the rainbow here. Because if you remember, your colors of the rainbow are actually red, orange, yellow, green, blue, indigo, and violet. And I can kind of fake it with the blue, indigo, and violet. And I certainly have red, yellow, and green, but I actually don't have orange. Orange wasn't on that list. So how am I going to get around that? Well, the IBM engineers are very smart, and they figured out a way around that. So they said, OK, for the low intensity colors, yellow is actually going to be orange. And we're going to do that by making green have like a one-third brightness. And so then if I look at this color range, I get from on the left-hand side, the low intensity black through white with yellow is no longer yellow. It's actually orange, although IBM had to mess it up somewhere. And so it's not actually called orange. It's called brown. And on the right-hand side, we've got the bright black all the way up to bright white. And that is the color set that you find on plain text. But why do we only have 16 colors? This answers why we only have 16 colors for the foreground, but it doesn't answer why we only have these eight colors on the left for the background. Why is that? Well, it actually comes to how the bits are represented in a full byte. So clearly I've got four bits that I'm using for full foreground text colors. So foreground, foreground, foreground, foreground, and that's the IRGB bits. The background colors, I only have eight of those. That's clearly going to be using only three bits, and that's just RGB. Well, what's that last bit? What's the last one that's going to fill up my full byte? Well, it's the most important part of user interfaces ever, and that's blinking text. So the leftmost bit is the blink called the blink bit. And if you have that turned on on a CGA system, your text will blink. And by the way, later VGA systems allowed you to reset what the blink bit did, and it would actually give you bright background colors. So if some of you are saying, oh, you actually do have these bright background colors, you're using a VGA system. But on the original CGA system, that was a blink bit. Anyway, thanks very much for attending this lightning talk about why your PC only has 16 colors. My name is Jim Hall. I have questions in the chat. Thanks, judge. Thank you.
 Hi everyone, I'm Jim Hall and thanks for attending my lightning talk about why your PC only has  16 colors and why is there a bright black anyway?  So as I said, I'm Jim Hall and I've done a number of things in open source software,  but one thing you might know me from is the founder and project coordinator of the Fridos  project.  Now if you've ever booted Fridos or any other operating system into plain text mode, you  probably notice you only have these 16 text colors.  I am talking only about text in this case.  You're getting these 16 text foreground colors and actually only eight text background colors.  Why only 16?  Why only eight?  And why are they called black, blue, green, cyan, red, magenta, brown and white?  Where do those color names come from?  Well, like many things in technology, it really comes down to compatibility.  And with text color, it actually goes back to compatibility with the original IBM PC released  in 1981, the IBM personal computer 5150 and actually specifically the IBM color graphics  adapter, the IBM CGA.  All the decisions about text color that you see today in 2021 actually date back to 1981  and the original IBM CGA.  So to talk about color, let me briefly talk here about binary.  So as you might know, binary is just a series of things that are on or off.  It's like a light bulb.  It's either on or it's off.  And PCs, certainly retro PCs like to think in a series of eight things that are on or  off.  Each thing that's on or off is called a bit.  And when they're eight altogether, that's called a bite.  And so here I've represented these four different numbers using light bulbs or using little  circles showing the numbers one, two, three and four.  So the number one is just a series of off plus on in the one position.  Two is a series of off plus an on in the two position and an off in the one position.  If I have an on in both one and two, well, one plus two is three.  And then at the bottom row, you can see it's a series of zeros except of an on in the four  position.  So that's how we can count in binary.  You can count all the way up to 255 using binary in an eight-bit system.  Of course, we don't actually represent binary using little light bulbs anymore.  We actually just use the numbers one and zero to represent on and off.  And so here I've got those same numbers, one, two, three and four represented in binary  using zeros and ones.  And that's really all you need to kind of understand why color looks the way it does.  So let's talk about color.  So I can take color and represent it as three different light colors, red, green and blue.  And if I mix those, I can actually get a variety of different colors, right?  So if I have red, green and blue all happening at the same time, I get white.  And if I have all of them turned off, of course, I get black.  And I can mix any two colors to get a variety of other colors as well.  And in fact, if you look back on the original IBM CGA and the original IBM color display,  each pixel was actually a series of red, green and blue dots.  They were just so close together.  They just looked like a single dot.  And so you can see I've drawn a little square around each pixel that would have been on  the screen.  So again, every color was being represented as a mix of red, green and blue.  Well, if it's red, green and blue, and I have them on or off, well, I can represent that  through binary.  It's either on or it's off.  And so red, green, blue, RGB, I'm going to represent that as binary.  And so each one of these binary numbers is really R, G and B.  And that's why if I have 001, that means only blue is turned on.  So I get a blue color.  And if I have 100, that means I've only got red turned on and I get a red color.  And if I have 101, that means I've only got red and blue turned on and I get sort of a  magenta color.  And if I have all of them turned on, 111, I get full white.  And if they're all turned off, of course, I get black.  So that's a great way.  I can actually get eight colors.  I can get zero to seven.  I can get black to white.  Well, IBM engineers were smart and they realized we can actually add an extra bit and we can  double the colors.  And so that's what they did.  They added an extra bit.  And so the rule was is that now we don't have just RGB.  We have I RGB because the left bit now is an intensity.  And so if I have the intensity turned on with a one on the right-hand side, you can see  that those colors of 1,000 to 1,111, those are all bright colors.  And so I've got bright black to bright white.  And if I have the intensity turned off, so I've got zero, like I've got 0,000 or 0,111,  well, I'm going to display the color at, let's say, some half intensity, some half bright  intensity.  That gives me just regular black through white.  And that gives me now 16 colors.  And I can probably stop here.  Oh, wait a second.  I actually don't have 16 colors because black and bright black are actually the same color  because I don't have red, green, or blue turned on at all.  So OK, we can fix this.  We can do an adjustment.  So we're going to modify that IRGB.  And we're going to say if it's low intensity, if that intensity bit is turned off, it's  set to zero, then certainly if any of the bits in RGB are set to zero, it's going to  be off.  But if it's set to one, I'm going to set that to like a two-thirds brightness with  the intensity turned on.  So it's a one in that leftmost bit position, then for any zeros in red, green, and blue,  I'm actually going to turn that to a one-third intensity and any ones in RGB.  I'm going to set that color to be a full brightness.  And so that means that now I've got these 16 actual colors from on the left, black to  white, and on the right-hand side, I've got bright black to bright white.  And by the way, that is why you have bright black.  And so now I've got all the colors that I need.  I've got all the colors of the rainbow, except, oh, wait a minute, I actually don't have all  the colors of the rainbow here.  Because if you remember, your colors of the rainbow are actually red, orange, yellow,  green, blue, indigo, and violet.  And I can kind of fake it with the blue, indigo, and violet.  And I certainly have red, yellow, and green, but I actually don't have orange.  Orange wasn't on that list.  So how am I going to get around that?  Well, the IBM engineers are very smart, and they figured out a way around that.  So they said, OK, for the low intensity colors, yellow is actually going to be orange.  And we're going to do that by making green have like a one-third brightness.  And so then if I look at this color range, I get from on the left-hand side, the low  intensity black through white with yellow is no longer yellow.  It's actually orange, although IBM had to mess it up somewhere.  And so it's not actually called orange.  It's called brown.  And on the right-hand side, we've got the bright black all the way up to bright white.  And that is the color set that you find on plain text.  But why do we only have 16 colors?  This answers why we only have 16 colors for the foreground, but it doesn't answer why  we only have these eight colors on the left for the background.  Why is that?  Well, it actually comes to how the bits are represented in a full byte.  So clearly I've got four bits that I'm using for full foreground text colors.  So foreground, foreground, foreground, foreground, and that's the IRGB bits.  The background colors, I only have eight of those.  That's clearly going to be using only three bits, and that's just RGB.  Well, what's that last bit?  What's the last one that's going to fill up my full byte?  Well, it's the most important part of user interfaces ever, and that's blinking text.  So the leftmost bit is the blink called the blink bit.  And if you have that turned on on a CGA system, your text will blink.  And by the way, later VGA systems allowed you to reset what the blink bit did, and it  would actually give you bright background colors.  So if some of you are saying, oh, you actually do have these bright background colors, you're  using a VGA system.  But on the original CGA system, that was a blink bit.  Anyway, thanks very much for attending this lightning talk about why your PC only has 16  colors.  My name is Jim Hall.  I have questions in the chat.  Thanks, judge.  Thank you.
retro_colors_0_179.png retro_colors_180_455.png retro_colors_456_731.png retro_colors_732_1511.png retro_colors_1512_2219.png retro_colors_2220_4679.png retro_colors_4680_6107.png retro_colors_6108_7427.png retro_colors_7428_7571.png retro_colors_7572_9167.png retro_colors_9168_10295.png retro_colors_10296_10943.png retro_colors_10944_11495.png retro_colors_11496_11783.png retro_colors_11784_12791.png retro_colors_12792_14243.png retro_colors_14244_14543.png retro_colors_14544_14941.png