Today we had what felt like a very successful class. We’ve been working on 3D topics, so I started by explaining about different 3D technology like anaglyph, polarized filters, and the processing by the eyes and brain (3D with only one eye). We used the XOs to take some stereographic images and started trying to convert these to anaglyph (red/blue) 3D images. We took a theoretical break this time to talk about how pictures are represented in computer files. First, I had the kids define what a picture is. The definition they came up with is that a picture is a organization of colors into shapes to represent something so it can be saved for later. Then I asked the kids how the computer knows what colors are. The kids were familiar with mixing paints, so I explained the difference between mixing colored pigments and mixing colored light. Then I had the kid figure out how colors could be specified as numbers. They seemed to understand how colors could be specified as numerical amounts of basic colors (read, green, and blue). But then, I tried to challenge them a bit more by asking how they can represent numbers in terms of 1’s and 0’s. This is the part that kind of surprised me how well they picked it up. Even one of the kids that had trouble with fractions in school even seemed to get it (maybe we should start kids out with number theory instead of fractions and multiplication tables–I hated multiplication tables when I was a kid). To get them started, I used the old joke about there being 10 kinds of people in the world, those that understand binary, and those that done (10 in binary is 2 in decimal). Part of what was easy for them is that it was just enumerating binary and then showing them the same thing for hexadecimal, only up to 17. Then I had them google “hexadecimal color” and they found the familiar triplet of 2 digit hexadecimal color codes. I had them google it because I don’t like giving away the answer without doing some work on their part. To make sure they got it, I made them tell me which of the #123456 digits in the color code represents red, green, and blue (actually it’s pretty easy that 12 are red, 34 are green, and 56 are blue–the same order one would expect–but having them compare the colors in the palette with the numerical code was a kind of hands on thing that made them see how the colors can mix). I got into a slightly more advanced topic, that each color scale has 256 (0-255) values, but only some people got the fact that FF (hex) == 255 (decimal).
Decimal to binary to hexadecimal conversion is easy if you go step-by-step, just adding one to the previous number:
Color codes and the color palette: connecting the dots/pixels🙂