5.5. Color Style Manager
Prev | 5. GUI Tools | Next

### 5.5. Color Style Manager

With Backdrop Style Manager, this is probably the most important theme tool in NsCDE. This tool applies colors to the widgets, menus, applications and backdrops. As in CDE, it reads color information from the palette files in `$NSCDE_DATADIR/palettes` and `$FVWM_USERDIR/palettes`. Palettes are the 16bpp color definitions (8 of them). This colors and border bg/fg/sel colors calculated from them are the base of the look of pretty much all of the things on the screen. Colors can be applied in 4 or 8 colors mode. Most notable palettes are Broica in 8-colors mode and Solyaris (called Default on SunOS) in 4 colors mode. Color mode can be selected with the Number Of Colors dialog which opens when the same named button in the main dialog of Color Style Manager is pressed.

Color Buttons and the Number of Colors selection determine the number of colors that make up a palette. You will have four or eight colors in the Color dialog box. The different color buttons in the palette control the colors used for different areas of the screen.

Figure 30. Color Style Manager

If you have eight color buttons, they will be used as follows (buttons numbered from left to right, top to bottom):

1. Active window borders, corners and titlebars

2. Inactive window borders and non-application menus

3. Workspace Manager (WSM) Switch for workspace 1 and 5

4. Text, text field, list areas and text areas

5. Main window background and Workspace 2 and 6 button background

6. Dialog box background, menu bar, popup menu and background of workspace 3 and 7

7. Workspace 4 and 8 background

8. Front Panel background when "Color 8 for Front Panel and Icons" is selected in the "Number of Colors ..." subdialog.

If you have four color buttons, they will be used as follows (buttons numbered from left to right):

1. Active window borders

2. Window bodies:

   1. Inactive window borders and non-application menus

   2. Main window and dialog box backgrounds and menu bar

   3. Front Panel background

3. Workspace switches and backgrounds

4. Text, text field, list areas and text areas

Color Style Manager as most tools is written in FvwmScript with background shell helper and color calculation and generator routines. Visually it tries to be as much as possible similar to the original CDE, but since it has some new features, there are some new buttons and commands introduced. Tool has a list of the palettes (system + user), preview button which can temporary apply some palette on the current workspace backdrop and FVWM based applications (FrontPanel, other scripts ...)

As in Backdrop Style Manager there are Add and Delete button actions. System palettes cannot be deleted, while local can be added to `$FVWM_USERDIR/palettes` and applied immediately.

Importing a ready-made new custom Palette: you can import your own palette

1. Open the Color Style Manager.

2. Choose Add ... in the Color dialog box.

3. Browse files and directories to the new Palette file. Palette file must have .dp extension and conform to the simple format (8x16bpp hex colors).

4. Select the new Palette file from the list of files

5. Click OK in the Color dialog box.

Custom Palettes from the `$FVWM_USERDIR/palettes` can also be deleted. Just pick the name from the list and click on the Delete ... button. You will be asked for confirmation, and then, if standard UNIX filesystem user and group ownership and permissions are allowing that, palette file will be permanently deleted.

Creating new palette by modifying an existing one makes a copy of the currently selected palette with a default name "Custom". When applying this new palette, Color Style Manager will ask you to rename this palette, which is a good idea, because the next modification will rewrite "Custom" generic name again, and previous work will be lost. You then create your custom palette by modifying the copy, so the original palette is not changed.

Figure 31. Color Style Manager: Modify Color

Button Modify will popup color editor if user selects one of the 8 (or 4) base colors. When selected, this color frames will get "Abc" written in them with automatic foreground choice for that RGB/HSV combination. Frames can be unseleced by simply clicking on them again. When one base color is selected Modify will present editor with controls for Red, Green and Blue values, as well as Hue, Saturation and Value. On the top left corner are preview squares with names "Old" and "New". When changing color with RGB and/or HSV controls, this "New" square button will change it's colorset. Color can also be picked from any screen element with Grab Color button- If action is not Cancel but OK, selected color will be modified and new palette with generic name "Custom" created immediately. When finishing theme selection in Color Style Manager with modified colors, Color Style Manager will ask for a name of the new palette. The suggested default is "Custom" but on the subsequent modification, this is the palette which will be modified and past modifications will be effectively lost. For that reason, it is probably a good idea to save modified palette as new palette with some other name. In that way, it can be temporary changed for some other and turned back again later. This color modification dialog actually serves as palette creator (based on previous palettes) and editor.

There are 8 spaces with colors from the currently selected palette (4 spaces in 4-color mode) and generated XPM file with all 40 colors displayed. Button Number of Colors calls transient window where user can select 4 or 8 color mode. System default on modern desktop is 8.

Key Bindings:

- Ctrl+Return: Perform a change. Like if OK was pressed.

- Ctrl+Q: Quits Color Style Manager.

- P: Like Preview was pressed. Previews currently selected color scheme from the list

- C: Loads Number of Colors dialog

- I: Loads Color Theme System Integration dialog

- M: Loads Modify Color dialog as if Modify was pressed

- Up/Down: Goes one item on the color schemes list up or down.

- Sun Help and F1: Displays this help text.

Notice: In the preview mode under FVWM3 non-global monitor layout, only the backdrop of the currently focused monitor is previewed in the colors of the new palette.

#### 5.5.1. Number Of Colors Dialog

A Color Style Manager part

Helper dialog to select 4, 8 or default color scheme in Color Style Manager. It changes number of colors while browsing, previewing or choosing a color theme, as well as two additional options for 8 colors scheme.

- Use 4 Colors Scheme: Uses only the first four colors of the choosen palette. With slightly modified palette "Crimson" this was probably default on all versions of Sun Solaris.

- Use 8 Colors Scheme: uses full palette with all 8 colors. This is NsCDE default on all modern displays.

- Default (4|8): Indicates default which can be changed or turned back.

- Color 8 for Front Panel and Icons: in 8 colors scheme, this will make icon part of the Front Panel and workspace icons background to use eighth color from the choosen palette instead of fifth color. This scheme was known to have been default on some HP-UX and AIX versions of CDE, and in NsCDE it is a user option. This option does not have effect in 4 colors scheme, and hence cannot be selected together with it.

- Color 6 for Workspace Manager: in 8 colors scheme, this will make Workspace Manager colored with color 6 which is usually used for menus, and tools background. This scheme was default on some versions of CDE on some UNIX systems, but in NsCDE it is a user option. This option does not have effect in 4 colors scheme, and hence cannot be selected together with it.

Figure 32. Color Style Manager: Number of Colors

Key Bindings:

- Ctrl+Return: Selects OK.

- Escape: Quits Dialog.

- Sun Help and F1: Displays this help text.

#### 5.5.2. Color Style System Integration

A Color Style Manager part.

An important new feature in NsCDE 2.3 is Color Style Manager's widget integration options reworked. This are:

- Own currently used backdrop synchronization (default)

- X resources in `$FVWM_USERDIR/Xdefaults` (default)

- GTK2 (default)

- GTK3 (default)

- Qt4 (default)

- Qt5 (GTK2 engine deprecated)

- Qt5 Kvatnum engine

- Qt6 Kvatnum engine

- User's `$FVWM_USERDIR/libexec/colormgr.local` script if exists, called with the path of the applied palette and number of colors.

The last integration is used to integrate what default widget integrations cannot reach. For example Gkrellm skin or some terminal preferences. Qt/Qt5 integration is easy, since this toolkits can use their GTK engine to integrate self with GTK theme.

Since NsCDE 2.3, Qt5 (but not Qt4) is using Kvantum based engine for integration with the rest of NsCDE and other widgets. Qt6 is using Kvantum exclusively. Old GTK2 Qt5 engine in Color Style Manager can be selected as an alternative to Kvantum engine if Kvantum engine is not available on the system. Qt6 is different: it uses only Kvantum engine, so Qt6 Kvantum engine is mandatory for newer systems using Qt6. Kvantum NsCDE theming has somewhat finer tuned and polished look, however it has still some inconsistencies in QDialog based widgets when scrollbars are used there in them.

GTK2 and GTK3 are heavy work part. Here, we are using work derived from one CDE theme for XFCE desktop and GTK2 + GTK3, purified and adapted for NsCDE (see Section 24, “Credits”). This is written in python. If turned on, this will produce `$HOME/.themes/NsCDE` directory with the theme for GTK2 and GTK3, and will edit `$HOME/.gtkrc-2.0` and `$HOME/.config/gtk-3.0/settings.ini` to put or change `gtk-theme-name` value. If NsCDE palette with dark background 4 color is choosen, Color Style Manager will put `gtk-application-prefer-dark-theme` into `$HOME/.gtkrc-2.0` and `$HOME/.config/gtk-3.0/settings.ini`. If palette with light color 4 (used for text areas and text fields usually) is choosen, that variable will be removed from the both configuration files. When switching off from NsCDE to some other environment, care must be taken manually to handle `gtk-application-prefer-dark-theme` in configuration files if last palette in NsCDE was using dark background.

If `nscde_use_xsettingsd` is set to 1 in the `$FVWM_USERDIR/NsCDE.conf` after applying new color theme, user's X Settings in `$FVWM_USERDIR/Xsettingsd.conf` will be adjusted and xsettingsd(1) daemon restarted for settings in GTK and Qt applications to be applied immediately. This option can be enabled by editing NsCDE.conf or during initial setup. NsCDE starts xsettingsd daemon with "-c $FVWM_USERDIR/Xsettingsd.conf" parameter. This file must be present if it was not installed by the initial setup procedure.

This Helper dialog serves to select graphical widgets which will be integrated with NsCDE. As said above, NsCDE provides it's own X resources for Athena and Motif programs, theme engines for GTK2, GTK3, Qt4, Qt5 and Qt6, and also extension to various single programs with `$[FVWM_USERDIR]/libexec/colormgr.local` like calculators, terminal emulators, Firefox, Thunderbird etc. Default selection assumes average modern Linux or similar system with GTK2, GTK3, Qt4 and Qt5 present. However, it is on user to decide here what of all this to run by selecting or unselecting checkboxes of the particular integration point.

Figure 33. Color Style Manager System Integration

Selected integrations in this dialog will be saved for the next time. This means that NsCDE will respect user's choice next time Color Style Manager is used without selecting or unselecting this options again. This also means that any non-working integration with some widget set should be inspected by opening this dialog while using Color Style Manager.

Key Bindings:

- Ctrl+Return: Selects OK.

- Escape: Quits Dialog.

- Sun Help and F1: Displays this help text.

Prev | Up | Next
5.4. Screen Style Manager (Xscreensaver) | Home | 5.6. Exec Dialog