Saturday, September 12, 2009

2.49a Color Picker



If you've used any imaging software such as Photoshop, you're probably familiar with selecting a color using the RGB sliders. Of course, you can do this in Blender as well. However, there is a feature called the Color Picker which gives you a number of other ways of choosing colors. Anywhere Blender asks you for a color, you can use the color picker.

We start by firing up Blender with its default scene. We're going to delete the default cube (right click to select, then X or the delete key to delete), and add a UV Sphere (Space - Add - Mesh - UVSphere). The standard way of selecting a color is to use the RGB sliders. We'll add a Material by selecting the UVSphere (Right Click) in Object Mode. To add a material, click the F5 (Shading) button, then the Materials button. Go to solid mode (press the Z key if you are in wireframe mode) so we can see the color. Then click the Add New button. To make the material red, drag the R slider all the way up to 1 and the G and B sliders all the way down to 0.

Another way to choose a color is by the combination of Hue, Saturation, and Value, or HSV. The color picker lets you do this either visually or by using the sliders in a similar fashion as RGB.

The rectangle to the left of the Col text has turned red to show the UVSphere's color. Left click on it to bring up the Color Picker.

Drag the little circle on the color picker swatch to change the hue. Dragging to the right increases the hue value from 0 to 1. Dragging to the left decreases the hue value from 1 to 0. As you drag, notice that the Hue settings, on the right, change as well.

There are two boxes, in the lower right part of the color picker. The lower box shows the old color. The box on top of it shows the new color. The color hasn't been applied yet. There are two ways to apply the color. You can drag the cursor out of the color picker box, or you can press Enter. In either case, the color is applied and the new color shows in the color rectangle.

Click on the color rectangle to bring up the color picker. You can also drag the little circle in the Saturation and Value square. The saturation ranges from 0 to 1 along the y axis, and the value ranges from 0 to 1 along the x axis. Note how the saturation and value sliders change as you move the circle. Drag the cursor out of the color picker into the 3D viewport to select the color.

Click on the color rectangle to bring up the color picker. There's another way to choose a color, by direct entry of a hexadecimal RGB value. Each RGB value can range from 0 to 255, which is 00 to FF in hexadecimal. Here's a cream color, for example, with a hexadecimal value of FFCC99. We can enter this value in the hexadecimal value area. Again, we drag the cursor out of the color picker into the 3D viewport to select the color.

Click on the color rectangle to bring up the color picker again. There are 16 presets which let you store custom colors in the color picker. You can select a color by clicking on one of the presets. Or, you can create your own preset, which Blender saves between sessions. That way, you can create your own palette. we'll create a color and then select a preset rectangle, then ctrl-left click to create our custom preset.

Finally, the Sample button lets you select a color from anywhere within your Blender screen. After you press the Sample button the cursor turns into an eyedropper. Move the eyedropper anywhere within Blender and then left click to select the color that way.

You can use the Sample button, combined with the Image Browser, to sample a color from an image on your hard drive. Split the screen (position the cursor on the border, then right click and select Split), choose the Image Browser. Navigate to the directory containing your images. Then go back into the Color Picker, click the Sample button, and sample an image from the thumbnails shown on the Image Browser.

Blender's color picker gives you a number of ways of choosing colors beyond using the RGB sliders. You can select from the hue swatches, from the Saturation and Value square, or enter the HSV values directly into the color picker. You can enter hexadecimal RGB value. Or you can sample a color by pressing the Sample button.