「Colorsets」

  CREATED BY JENKINSBOT

Colorsets are a powerful method to control colors. Colorsets create appearance resources that are shared by
fvwm and its modules. When a colorset is modified all parts of fvwm react to that change. A colorset
includes a foreground color, background color, shadow and highlight color (often based on the background
color), background face (this includes images and all kinds of gradients). There is a way to render
background face and specify other color operations.

In the 2.4.x versions a special module FvwmTheme was introduced to manage colorsets. Starting with the 2.5.x
beta version, the FvwmTheme functionality was moved to the core fvwm, so this module became obsolete. In
2.6.7 the FvwmTheme module was removed.

新旧语法对应

The old syntax:

DestroyModuleConfig FvwmTheme: *

*FvwmTheme: Colorset 0 fg black, bg rgb:b4/aa/94

*FvwmTheme: Colorset 1 fg black, bg rgb:a1/b2/c8

corresponds to the new syntax:

CleanupColorsets

Colorset 0 fg black, bg rgb:b4/aa/94

Colorset 1 fg black, bg rgb:a1/b2/c8

Colorset num [options]

Creates or modifies colorset num. Colorsets are identified by this number. The number can start at

zero and can be a very large number.

Warning: The highest colorset number used determines memory consumption. Thus, if you define

‘Colorset 100000’, the memory for 100001 colorsets is used. Keep your colorset numbers as small as

possible.

By convention, colorsets are numbered like this:

# 0 = Default colors

# 1 = Inactive windows

# 2 = Active windows

# 3 = Inactive menu entry and menu background

# 4 = Active menu entry

# 5 = greyed out menu entry (only bg used)

# 6 = module foreground and background

# 7 = hilight colors

If you need to have more colors and do not want to reinvent the wheel, you may use the convention used

in fvwm-themes, it defines the meaning of the first 40 colorsets for nearly all purposes:

Each colorset has four colors, an optional pixmap and an optional shape mask. The four colors are

used by modules as the foreground, background, highlight and shadow colors. When a colorset is

created it defaults to a foreground of black and background of gray. The background and foreground

are marked as “average” and “contrast” (see later) so that just specifying a pixmap or gradient gives

sensible results.

[options]的取值

options是一系列使用逗号分割的关键字列表,可使用的关键字有:fg, Fore, Foreground, bg, Back, Background, hi, Hilite, Hilight, sh, Shade, Shadow, fgsh, Pixmap, TiledPixmap, AspectPixmap, Transparent, RootTransparent, Shape, TiledShape, AspectShape, NoShape, ?Gradient, Tint, fgTint, bgTint, Alpha, fgAlpha, Dither, NoDither, IconTint, IconAlpha, Plain