Monday, July 6, 2009

Creating Custom color palletes using The GIMP

My spouse wants to create art using carefully-arranged Rubik's Cubes. She needs a tool to do it: She needs to manipluate images to the right color and pixellation to look cube-ready (Solving them to the displayed configuration is another issue).

So let's set up The GIMP to do it.

Preparation: GIMP needs to know what colors to use, so let's create a custom color pallette. (This only needs to be done the first time)

  1. Find an image or two with cube colors (Google is handy for this). Copy the images to your clipboard.
  2. Import the image to GIMP: File -> Create -> From Clipboard
  3. Create the new color palette: Image -> Mode -> Indexed -> Use Custom Palette -> Open The Palette Selection Dialog -> New Palette
  4. Select the six colors: Use the color-picker tool to change the foreground color, then right-click in the palette-editor to add each color.
  5. Save the new palette with a name you will remember, like 'Cube Colors'


Changing an image

  1. Import the image into GIMP
  2. Reduce the image to the six cube colors - Image -> Mode -> Indexed -> Use Custom Palette -> Cube Colors
  3. Reduce the image to manageable size with Image -> Scale Image Pick a small size that is a multiple of 3 (3 rows/colums on each cube)
  4. NEED a way to split the image into 3x3 (blown up to 9x9) squares for each cube.


Scripting for batch-resizing: This looks possible using Imagemagick - see "using pre-defined color maps" for an easy way to get Imagemagick to reduce the colors.

No comments:

Post a Comment