## GNOME Color Browser manual

2000
Alexander Kirillov

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and those trademarks are made aware to the members of the GNOME Documentation Project, the names have been printed in caps or initial caps.

## Introduction

&gcolor; is a utility for selecting screen (i.e., X Window System) color. X Window System comes with many pre-defined colors, from Alice Blue to Pale Goldenrod to Yellow Green. &gcolor; lets you browse these colors and select one of them to be used by an application. It also allows you define your own collection of favorite colors, or find a pre-defined color most closely matching a given one.

To run &gcolor; select Color Browser from the Utilities submenu of the Main Menu, or type `gcolorsel` on the command line.

&gcolor; is included in the `gnome-utils` package, which is part of the GNOME desktop environment. This document describes version &version; of &gcolor;.

## Using GNOME Color Browser

&gcolor; is used for manipulating palettes, i.e. collections of screen colors. It allows you to browse the system palette (list of colors that come pre-defined with your system), define and edit your own palettes, select a color from any of these palettes to be used by an application, or find best matches for a given color in these palettes.

&gcolor; can also be used to define new colors; however, it only makes sense to do so if you plan on using this color many times. In this case, you can use &gcolor; to define a new color and add it to your personal palette. If you only want to use a color once, it is easier to use the default GNOME Color Selector.

### Working with multiple documents

The main &gcolor; window may contain several sub-windows ("views"). Each of these views shows either a contents of a palette (system or your personal one) or a search window, used for finding matching colors. For example, in the default configuration &gcolor; starts with 4 views: two showing the system palette (one listing colors by name, the other using small color squares to represent them), a view of the users palette (originally empty), and a search window. Having multiple views can be very convenient if you want to work with several palettes at the same time, use drag and drop to move a color from one palette to another, etc.

To switch between views, click on the views tab at the top (provided that you are using default GTK theme) of the window. If there are too many open views so that the tabs do not fit the screen, you will see 2 arrows at the top right of &gcolor; window; these arows allow you to scroll through the tabs.

Every time you open a new view, a new sub-window is added to the existing ones. To close a view, select File Close Close view or click on the Close in the toolbar. If you have several views showing the same document, you can close all of them by selecting File Close Close document (do not forget to save it first if you made any changes). Finally, you can also drag a view tab out of &gcolor; window; this will create a new &gcolor; window, showing this view.

### Using a color for an application

Once you have found a color you like, there are two ways you can use this color in an application. The easiest way is to utilize drag and drop: all the color bars you see in the &gcolor; window can be drag-and-dropped onto any GNOME component which has configurable colors. For example, you can drag a color onto GNOME Panel to change Panel's background color, or onto GNOME Terminal to change its background.

You can also use the color with many X Window applications which are not GNOME-compliant, for example with emacs text editor. Most of X applications accept command line options `-bg COLOR` and `-fg COLOR` to specify the background and foreground color. COLOR can be either a system color name, as shown by &gcolor; or its description by a triple of numbers, Red, Green, and Blue (RGB) values. For example, the command

    	  emacs -bg lightblue -fg darkgreen

will start emacs with light blue background and dark green foreground. Note that contrary to common UNIX conventions, color names are case-insensitive. More information about colors in X Window System, RGB values, color depth, etc. is given in .

## Menus and toolbar

### Menubar

The menu bar, located at the top of the &gcolor; window, contains the following menus:

File

  This menu contains the following commands:

  - New: this command allows you to create a new empty palette (see ) or a new view of an existing palette in a different window.

  - F3 Open : this command opens an existing palette, prompting you to select a file containing this palette.

  - Ctrl-S Save palette : saves current palette. Note that system palette can not be changed by a user, so this command has no effect in the system palette view. It also has no effect in search documents.

  - Save palette as : saves the current palette under a new name. Has no effect in search documents.

  - Revert : discard the changes you made to the current document, restoring the palette to the original state.

  - Ctrl-W Close : allows you to close the current view or all views of the current document.

  - Ctrl-Q Exit : exits the program.

Edit

  This menu contains the following commands:

  - Ctrl-C Copy : copies the currently selected color(s) to the clipboard

  - Ctrl-V Paste : pastes the contents of the clipboard into current document.

  - Insert color: creates a new edit sub-window allowing you to define a new color and add it to the current document.

  - Remove selected colors: remove selected colors from the palette.

  - Edit selected colors: this command launches a new sub-window in which you can change the properties of selected colors (see ).

  - Document/View properties: launches Properties dialog

  - Preferences : launches Preferences dialog

Help

  This menu contains:

  - Manual: shows this manual.

  - About: shows basic information about &gcolor;, such as the author's name and the application version number.

### Toolbar

The toolbar is located under the menubar and contains the following buttons:

- Exit: exits the program.

- Open: opens an existing palette, prompting you to select a file containing this palette

- Close: closes the current view sub-window.

- Grab: allows you to select a color anywhere on the screen for matching (see for detailed description).

- About: shows basic information about &gcolor;, such as the author's name and the application version number.

## Documents and views

&gcolor; uses the term "document" to refer to any collection of colors, each each color given a name. The simplest type of document is a palette, which is just a collection of colors listed in a file; this is described in . Another type of document is search document, which is a list of colors closely matching a given one found in various palettes. In addition, &gcolor; provides a number of different ways, or "view modes" to show the same document. Available view modes include:

- List: in this mode, &gcolor; lists all colors in a document showing a small sample, Red, Green and Blue (RGB) values and name for each color (see for detailed information about RGB values).

  By default, the colors are listed in the same order in which they appear in the file, which is indicated by a small downward triangle next to the label Color. As with all GNOME applications, you can reverse the order by clicking on the word Color once. You can also have the list ordered alphabetically by name by clicking on Name label.

  You can change the default width of Value and Name fields by dragging the separator between these fields with the left mouse button.

  ### List view

  Color Browser System colors list view

- Grid : in this mode, &gcolor; shows just a small square color sample for each color, arranging this squares in a grid.

  ### Grid view

  Color Browser System colors by name

- Edit TODO

Regardless of the view you use, you can drag any of the color sample rectangles to GNOME Panel, GNOME Terminal, and many other GNOME applications windows to change their background colors.

## Working with palettes

A palette is just a list of colors, each one given a name. For example, X Window System comes with pre-defined system palette, containing hundreds of colors, from simple ones such as "red" or "blue" to exotic ones such as "LavenderBlush". You can also define your own palette, or several of them, as described below. Each palette is saved as a separate file; for example, the system palette is defined by the file `rgb.txt`, located in X11 library directory, usually `/usr/lib/X11R6/lib/X11`).

### Opening and closing palettes

By default, &gcolor; shows you 2 views of the system palette: one list view and one grid view. You can also open any other existing palette file by selecting File Open or using the Open button in the toolbar. You can also open another window containing one more view of the current palette by selecting File New New view.

To close the current view of a document, select File Close Close view; to close all views of the current palette, choose File Close Close document.

### Creating new palettes

In addition to system colors which an ordinary user can not change, you can also create your own color lists. To do so, select File New New Document . This will launch a dialog allowing you to select a new document type (choose File), short description, and a short name (this will be used for the tab label). YOu will also have to select a view mode for the new document (you can select several if you want to). After you click Finish, a new document view sub-window will appear in the main window of &gcolor;. Originally this window is empty; you can add any colors to it as described below.

### Editing and saving palettes

Once you have created your own palettes, you can add and remove colors to them, change palettes' name etc. Note that unless you are logged in as system administrator (root), you can not change system palette.

To add a new color to a palette, right-click anywhere in the palette and select Insert color from the pop-up menu, or select Insert color from the Edit menu. This will create a new dialog, allowing you to specify the name and RGB values for the color.

To copy a color form one palette to another, select this color in the first palette, copy it to the clipboard using Edit Copy switch to the second palette and select Edit Paste . You can also use keyboard shrotcuts Ctrl-C and Ctrl-V for copying and pasting respectively.

To remove a color from the palette, select this color by clicking on it and select Edit Remove selected colors . An easier way of removing a color is to right-click on it and select Remove selected colors from the pop-up menu. In the same way, you can select several colors and remove them all: to do so, click on the colors you want to select while pressing CTRL key. You can also select a continuous block of colors by clicking on the first color, and then clicking on the last color of the block while pressing SHIFT key.

Finally, you can change other properties of the document, such as the name and view mode used by selecting Document/View Properties from Edit or pop-up menus. This will launch Properties dialog.

After modifying a palette, you can save your changes by selecting File Save palette . You can also change modified palette under a new name by using Save palette as... command; this will prompt you for a new file name and location.

### Editing a color

To change a color in a palette, select it by clicking on it and select Edit Edit selected color , or just right click on the color and select Edit selected color from the pop-up menu.

## Search

This window, labelled Search, is used to find a system color most closely matching a given one. You can specify a color to match in several ways: by explicitly giving the RGB values using the sliders, by dragging and dropping a color from some other color source, such as default GNOME color selector (if you have selected the option On drop Search in Settings menu), or by grabbing a color of any pixel on the screen. To use this last method, click on Grab button in the toolbar. Your mouse cursor will turn into a dropper. Place the tip of this dropper over any point of the screen and click. &gcolor; will analyze the color of this point, determine the RGB values, and show this color and the RGB values in the Search window. It will also show all system colors closely matching this one.

### Search Window

Color Browser Search Window

&gcolor; shows only those colors which match the given one "close enough", and orders them by how close they are, so that the best matches are shown first. You can adjust its tolerance by using the Tolerance slider: smaller values make &gcolor; to be more selective, so that only very close matches are shown. Setting the tolerance value to 0 will show only exact matches; setting tolerance to 100 will show all the colors.

By default, &gcolor; only looks for matches among the system colors. This can be changed TODO

Another configurable option is the update mode. By default, &gcolor; continuously updates matches when you change the color (for example, by using the RGB sliders) —. If you find that this is slow on your system, you can use Settings Search update to change the update mode to Discontinuous (&gcolor; will only update matches after you released the slider) or Delayed ((&gcolor; will update matches with a delay of about 1/2 second).

## Colors in X Window System

In X Window system, each color is described by 3 numbers, namely the contents of Red, Green and Blue (as is well known, every color can be obtained by combining these three primary colors). These 3 values are commonly called the RGB values. Usually each of them is allowed to range from 0 to 255; for example, triple (0,0,0) is black, (255,0,0) is pure red, and (255, 255, 255) is white.

The total number of possible colors is thus 256×256×256=224=16,777,216. Of course, whether or not your system is actually able to show that many different colors depends on the configuration of X Window system, which is limited by the capabilities of your video card. Most modern video cards are capable of showing all these colors; some older cards will only be able to use 216=64,536 (colordepth 16) or even 28=256 (colordepth 8) colors. In this case, X Window System will still use triples like (234, 112, 243) for describing RGB values, but some of these triples will produce identical colors. More information about colors can be found in the manual page for X.

## Known Bugs and Limitations

At the moment, too many to list.

## Authors

&gcolor; was written by Tim Gerla and Eric Brayeur. Please send all comments, suggestions, and bug reports to the GNOME bug tracking database. (Instructions for submitting bug reports can be found on-line.) You can also use Bug Report Tool (`bug-buddy`), available in the Utilities submenu of Main Menu, for submitting bug reports.

This manual was written by Alexander Kirillov (kirillov@math.sunysb.edu). Please send all comments and suggestions regarding this manual to the GNOME Documentation Project by sending an email to docs@gnome.org. You can also add your comments online by using the GNOME Documentation Status Table.

## License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to

    	Free Software Foundation, Inc.
    	59 Temple Place - Suite 330
    	Boston,
    	MA 02111-1307
    	USA