September 30, 2008 Archives

Tue Sep 30 14:45:01 CDT 2008

Paint by Numbers

I used to do Paint by Numbers when I was a kid. I'd end up with something that looked like a bad painting of a horse, but when you're working with 8 colors, what do you expect? Paint by Numbers works because it strictly limits your color choices. By removing the subtle difference between Mahogany and Oak and calling them both Brown you are able to work with a manageable palate. This also gives you the advantage of wide target areas to paint. "Chest is brown" is a lot easier than "Hair #7281 from the left is brown (shade #832) with black shadow (shade #19)"

Computers work in a similar way. You have probably noticed videos on Youtube that seem blocky and blurry. This happens when the computer breaks a picture into more manageable pieces to reduce file size.

Most image editing programs have a "Paint Fill" or "Bucket" tool that allows you to change the color of a section of the image. This normally doesn't work well with photographs because the color sections are too subtle. When you try to fill a section that looks white, the computer might see hundreds of shades of white in that area and only fill in exact matches. Dithered images have a similar problem. Dithering is dot shading, like in comic books. It is common in .gif images.

If you have a complex image and you want to simplify it to fewer colors, you can use The Gimp. The Gimp is an image editor like Photoshop, but it's Free software.

To reduce colors in an image:
  1. Open the image in The Gimp, using the File menu
  2. In the image's window select the Image menu
  3. From Image, select Mode, then Indexed
  4. Select "Generate optimum palette" and a Maximum number of colors.
  5. Experiment with the Maximum number of colors. Somewhere between 5 and 30 usually works.
  6. Make sure "Color dithering" is set to "None"
You might also note that after selecting "Indexed" you cannot set the options by selecting it again: First select "RGB" from the Mode menu then select "Indexed" again if you want to keep your new color scheme. Otherwise, you can select Edit > Undo (Ctrl + Z) to revert to the previous color scheme.

I used this to template color schemes for a web site. It is much easier to use the paint tool than to track down color codes in my css file when I want to try a dozen combinations in a hurry.

Posted by Nesman | Permanent Link