How to Change the Color of an Image for Your HTML5 and CSS3 Site - dummies

How to Change the Color of an Image for Your HTML5 and CSS3 Site

By Andy Harris

Frequently, you’ll have an image that’s great for your HTML5 and CSS3 site, but not the right color. For example, you may want to change the color of a person’s clothing, or make part of a logo fit the color scheme of the rest of your site. Gimp makes performing this effect quite easy:

  1. Load your starting image into Gimp and make any other adaptations you wish to the original image.

  2. Use the Fuzzy Select tool to select the part you want to modify.

    You might need to use the Shift key to add several variants of the color to the selection.

  3. Use the Copy command (Ctrl+C) to copy the section of the image you just selected.

  4. Use the Paste command (Ctrl+V) to paste the selected area into a new layer.

    The pasted area goes into a new “pseudo-layer” by default. In the Layers panel you’ll see a layer called Floating Selection – Pasted Layer. Click the New Layer button and you’ll create a new layer containing only the section you need.

  5. Colorize the new layer by applying the Colorize filter (Colors→Colorize).

    Play with the color sliders until you get the color you want. Because you made the changes on a new layer, you can always remove or hide the layer to return to the original. (Or have several different color layers so you can play with various options.)

Here is an example of this technique using an image of a glass of orange juice by Graur Razvan Ionut found at The original image contained only the picture of orange juice, but the juice glass was duplicated and the color of the second glass changed to look like coffee.