Showing posts with label Gradients. Show all posts
Showing posts with label Gradients. Show all posts
Lusus

Creating Colour Palettes with Gimp

 


In the first two parts in this series of colour palette tutorials we showed How To Generate Colour Palettes With Palettable, Colormind, And Coolors, then then how to Create Colour Palettes Using Cyotek Palette Editor. In both cases colour schemes were created by starting with one colour then generating others to form a harmonious palette. In the first tutorial the palettes were exported as images, whilst the second showed how to export a palette as a native Gimp palette file.


This final colour palette tutorial will follow on from the others by showing how images in Gimp can be used to create colour palettes. It will then show how to import the Gimp palette file created in Cyotek. We begin however by explaining how to create colour palettes from gradients.


The Palettes Dockable Dialogue



Before we can work with palettes in Gimp, we need to make sure their dockable dialogues (tabs) are visible. In the standard Gimp set up the tabs can be seen top right (highlighted in green). If they're not visible select Windows > Dockable Dialogs > Palettes and they will appear.


Creating Colour Palettes With Gradients

 

Gimp comes with many gradients already added, and its easy to create your own. Whatever gradients are available, they can all be used to create colour palettes.

 



 

1/ With the Palettes tab active, right click anywhere in the list of palettes then select Import Palette.

 



 

2/ The above window will appear. Select the Gradient radial button.

 

 


 

3/ From the drop down list, select a gradient to use.

 



 

4/ The colours for the palette will be displayed in the preview window. 

 



 

5/ The default number of colours for a palette is 256, but this can be edited with the Number of colors slider, (the total number of colours a palette can have in Gimp is around 10,000). The number of colours above has been changed to 35.


The default number of columns palettes are displayed in is 16, although this too can be edited, this time with the Columns slider.

 

When you're ready click Import

 



 

6/ The new palette will be visible, top right.

 

 


 

7/ The image above shows the palette with the Palette Editor tab active. In the space provided the name of the palette can be changed. Here its been changed to Gradient Palette Example.

 

Creating A Colour Palette From An Image Using The Colour Picker Tool

 
Probably the simplest way of creating a palette is to load an image in Gimp and use the Color Picker tool to select colours. 
 




1/ With an image loaded in Gimp, select the Palette tab, then right click anywhere in the list of palettes. From the drop down list select New Palette.

 

 


 

2/ A blank space will appear where the new palette will soon go.

 



 

3/ The palette can be given a name.

 



 

4/ Select the Color Picker tool from the Tools panel on the left. 

 

Because there are thousands of colours in this (and most) images the Sample Average option has been selected (highlighted in red). This will average out the colour within the radius of pixels selected. Here a radius of 9 has been used. This step is by no means essential, but it can be a good way of evening out colours and making them easier to select.



 

5/ Under the Color Picker tool options Use Info Window has also been selected. With the left mouse button held down, this window will show the colour under the cursor as it moves around the image.  Information about each colour will also be displayed, such as RGB colour percentages, the hex value and its X,Y coordinates.





6/  release the left mouse button and the selected colour will be added as the foreground colour, highlighted in red, above.



 

7/ Click the icon highlighted above to add the new foreground colour to the palette.



 

 

8/ Use the color Picker tool to select the next colour for the new palette. Add the colour to the palette by repeating step 7. Repeat this process until you have all the colours you need for the new palette.


Importing A Palette From An Image



 

1/ Although a standard image could be used for this method, the resulting palette would be made up of thousands of colours, so a work around is to change the image to a GIF which will limit the colours to 256.

 

The first step is to select  Image > precision > 8 bit integer, so the image exports correctly as a GIF.

 

 

 

 

2/ Export the image as a GIF.

 




3/ Load the GIF version of the image back into Gimp. With the Palette tab active right click anywhere in the list of palettes. From the drop down menu select Import Palette.



 

 

4/ The above window will open. Select the Image radial button and the preview area will show as many colours of the palette as will fit.

 

As you can see, the Number of colors slider is greyed out and can't be used. This is because a GIF image was used for the palette. If the inability to edit the number of colours is a problem the next method offers a better alternative.


When you're ready, hit the Import button.

 


 

 

5/ The palette can now be seen under the palettes tab.

 


 

 

6/ Under the Palette Editor tab the full range of colours in the palette can be seen, The palette can be renamed in the space provided.

 


Creating a Colour Palette From An Image

 
 


 

1/ As with the previous method of creating a palette from an image, the first step is selecting Image > Precision > 8 bit integer.

 



 

2/ Now select Image > Mode > Indexed.

 

 


 

3/ The above window will open. Select Generate optimum palette.

 



 

4/ As you could see in step 3 the maximum number of colours for this palette is 256. However, in this instance we don't need that many so this has been changed to 25. Here we can edit the number of colours for the palette, which we couldn't do when we turned the image into a GIF.

 

When you're ready hit the Convert button. 

 

 


 

6/ The new palette can now be seen under the Palettes tab.

 



 

7/ Although we can see the palette under the Palettes tab, if we were to close down Gimp the palette would be lost. To make sure the palette is saved click on it, then hit the duplicate icon, highlighted in green.

 



 

8/ Under the Palette Editor we can see the palette. 

 

When a palette is visible in the Palette Editor, it is the active palette, and if any palette color is clicked on, it will become the active foreground colour, seen to the left of Gimp. 




9/ The new palette can also be renamed in the space highlighted in red.

 

Importing a Palette File Into Gimp

 

As with many graphics software Gimp has its own native palettes file format. These palette files can be imported into, and exported out of Gimp.


In part two of this series on colour palettes we exported a palette file from Cyotek, and now we're going to import it into Gimp. If you'd like to see how this works for yourself, the colour palette file can be downloaded here. The file is stored on Google Drive so you can be sure its a safe download.

 




1/ With the Pallete tab active, right click anywhere within the list of palettes. From the drop down list select Import Palette.

 


 

2/ In the window that opens select the Palette file radial button. Click the icon highlighted in green.

 




3/ Using the window that opens, navigate to where the palette file is stored on your PC. Select it then hit the Open button.

 



 

4/  Now hit the Import button.

 



 

5/ The palette will now be added to the Palettes tab.

 



 

6/ The palette will also be visible in the Palette Editor tab, where it can be renamed etc, although its ready to use as it is.


Now that we've covered a lot of ground with calour palettes it should be much easier to generate a range of colours for a project. Colour seems an easy subject, until you start thinking about it, so hopefully this series of tutorials will take some of the guess work and stress out of using colour.


Read More
Lusus

How To Create Custom Gradients In Gimp


Creating a custom gradient in Gimp does not need to be a complicated process, and once you have a grasp of the basics each gradient can be used in your own designs. The wings of the butterfly pic here were filled with a custom gradient, and after we show how to create a custom gradient in Gimp, we'll walk you through how the image was put together so you can make your own butterflies if you want to.

Creating A Palette

The first step in creating a custom gradient in Gimp is to create a palette. If you need to, click on each image in this tutorial to enlarge.


1/ With Gimp open go to Windows > Dockable Dialogues > Palettes.


2/ The above window will open. Click on the icon second from the lower left with the green plus arrow to start creating a new palette.


3/ The Palette Editor should now be open, and should look something like the above.


4/ The Palette Editor adds colours from the active foreground colour, so first click on the foreground colour in the Toolbox, and the above Colour Selector window will open.

To select a colour either click within the large window to the left, or the vertical array of colours to the right of it. The sliders to the right can be used to further edit the colour. When you're ready click OK so the selected colour becomes the active foreground colour.


5/ An alternative and quick way of selecting colours is to download a colour chart similar to the above then open it in Gimp. Now simply use the Colour Selector tool (the eye dropper icon) and click on a colour. This will now become the foreground colour.


6/ The above image shows a selected foreground colour.


7/ In the Palette Editor window click the icon with the green plus sign, third from the lower left. The foreground colour is now added to the palette.


8/ Continue to add colours to the palette by following steps 4 to 7. The above image shows seven colours have been added to the palette. Name the palette in the top window then hit the icon to the lower far left to save it.


9/ You should now see your new palette under the palettes tab.



10/ Now you have your palette it can be used to create a custom gradient. Simply right click on the new palette and from the drop down menu select Palette to Gradient. Your new gradient is now ready to use.


11/ Select the Gradient Tool in the Toolbox panel and in the lower section click on the gradient thumbnail. Now from the drop down list select your gradient.


12/ If you now drag the cursor horizontally in the Image Window your gradient will fill the image space.

Using A Gradient To Create Butterfly Wings

If you want to create your own butterfly images using your custom gradients you'll first need a few layers, one to use as an alpha mask and the other as an overlay. You can either create your own layers or download the ones used in the tutorial here. They're stored on Google Drive so you can be sure they don't include anything malicious.

Once downloaded unzip and open both in the same Gimp image window so they form two layers. One way to do this is to drag them from the unzipped folder to the Gimp image window. Also in the unzipped folder you'll see a texture layer that will be used later in this tutorial, or if you prefer you can use your own texture.


This is the first butterfly layer.....


And this is the second butterfly layer. Make this the active layer and hide the other layer by clicking on the eye icon next to it in the layers tab.


1/ In the image above there are more layers than you'll see in your version of Gimp. We'll just be focusing on the first two layers for this tutorial. Right click on the active layer and from the drop down list select Alpha to Selection.


2/ There should now be an outline of marching ants around the butterfly silhouette. This will mask the transparent background so when we add the gradient it will only appear within the outline.


3/ Select the gradient tool, then from the available gradients select the one you created.


4/ In the bottom half of the tools panel select the Radial option from the Shape drop down menu.



5/ Create a transparent layer above the silhouette layer and make sure its the active layer. It should look similar to the above.



6/ From the centre of the butterfly shape drag the cursor outwards, and fill the shape as above. If you don't like the first attempt, just redo it.



7/ We're now going to add some texture to the butterfly wings and break up the flat colours. First add the texture layer (or one of your own) to the image window, so that its above the gradient layer. The marching ants outline of the butterfly should still be visible.

From the image menu choose Select > Invert. Now press Delete on your keyboard. The texture layer should now look like the above image.

Now hit Select > None and the marching ants outline should disappear.


8/ Towards the top of the layers panel is the Mode drop down menu. This will allow you to integrate the texture layer with the gradient layer in different ways. Go through the list until you find an effect you like. You can also play with the opacity of the top layer to see how that effects the image.

When you're ready right click the top layer and from the drop down menu select Merge.


9/ This is how the two layers look when merged in this example.


10/ Now make the other butterfly layer visible and place it above the two merged layers. Your butterfly is now complete.

The butterfly image is just one example of how gradients can be used with Gimp. With a little imagination there's a whole world of gradient creativity to explore.

Read More