HTML5 and CSS3 All-in-One For Dummies
Book image
Explore Book Buy On Amazon

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 FreeDigitalPhotos.net. 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.

image0.jpg

About This Article

This article is from the book:

About the book author:

Andy Harris taught himself programming because it was fun. Today he teaches computer science, game development, and web programming at the university level; is a technology consultant for the state of Indiana; has helped people with disabilities to form their own web development companies; and works with families who wish to teach computing at home.

This article can be found in the category: