1 The Mockup Preview
liquibyte edited this page 2026-11-19 16:23:31 -06:00

The Mockup Preview

The middle panel runs the chosen toolkit's own demo program inside Palette, in the theme you are making. This page describes the nine previews, the controls along the top of the panel, and how a color you drop on the widgets finds the part of the theme it changes, toolkit by toolkit.

1. The nine previews

Toolkit The program What its theme is
GTK2 awf, the widget factory A gtkrc: bg, fg, base and text colors for each state, widget classes, a theme engine
GTK3 GTK's gtk3-widget-factory CSS, over Adwaita's color variables
GTK4 GTK's gtk4-widget-factory CSS, over GTK4 Default's color variables
TQt 3 TQt's Themes example, with TDE's widget styles A palette of 16 color roles. TQt 3 is Trinity's continuation of Qt 3, the toolkit of the Trinity desktop (TDE).
Qt 4 Qt 4.8's Styles example A palette of 20 color roles, KDE color sets, Qt style sheets
Qt 5 Qt's Widget Gallery A palette of 21 color roles, KDE color sets, Qt style sheets
Qt 6 Qt 6's Widget Gallery The same, with a 22nd role, Accent
xtk xtk's own widget gallery 17 roles, each widget's own keys, gradients and bevels; see xtk Themes
Window Manager Palette's own desktop, drawn as Openbox, Blackbox or Fluxbox draws it Each part's colors and textures, sizes and fonts; see Window Manager Themes

Each toolkit keeps its own theme: switching between them loses nothing, and each comes back as you left it, also after a restart.

The previews are programs of their own, started by Palette and shown inside its panel. Palette writes the theme you are making into temporary files that the preview reads again on every change.

2. The header

Along the top of the Mockup panel, from left to right:

Control What it does
Toolkit The first drop-down: GTK2, GTK3, GTK4, TQt 3, Qt 4, Qt 5, Qt 6, xtk or Window Manager.
Theme The toolkit's presets and every theme installed on your system for it. Choosing one opens it.
Engine GTK2's theme engine, the Qt version's widget style, or which window manager the theme is for. GTK3, GTK4 and xtk have none. See Engines and Styles.
Apply To... Puts the theme shown onto all the other toolkits or one of them (below).
Reset After asking, puts the toolkit's theme back to its defaults.
Undo, Redo Step back and forward through your edits. All the toolkits share one history (below).
The gradient swatch The Gradient panel's gradient, to drag onto the preview like any swatch. For the window managers, a drop-down beside it chooses the gradient's form.

Above the widgets, GTK2 shows its grid of state colors, and the Qt versions show the grid of KDE color sets (both below). Rest the pointer on a drop-down, a button or a grid cell for a hint saying what it does.

The Theme list

The Theme list, with presets and installed themes

The Theme list: presets and installed themes, in alphabetical order.

The list holds the toolkit's presets and its installed themes, in alphabetical order. Choosing an installed theme opens it as File > Open would; your own copy is made only when you save. Each toolkit remembers its choice, also after a restart. Palette looks for installed themes here, your own folders first (a name found twice is the first one):

Toolkit Installed themes
GTK2, GTK3, GTK4 Theme folders in ~/.themes, ~/.local/share/themes (or $XDG_DATA_HOME/themes) and /usr/share/themes that have the toolkit's own folder (gtk-2.0/gtkrc, gtk-3.0/gtk.css, gtk-4.0/gtk.css).
TQt 3 TDE color schemes (.kcsrc) in ~/.trinity/share/apps/kdisplay/color-schemes, ~/.kde/share/apps/kdisplay/color-schemes, /opt/trinity/share/apps/kdisplay/color-schemes and /usr/share/apps/kdisplay/color-schemes, and your ~/.qt/qtrc, listed as "qtrc (yours)".
Qt 4 KDE color schemes (.colors) in ~/.kde/share/apps/color-schemes, ~/.kde4/share/apps/color-schemes, /usr/share/kde4/apps/color-schemes, ~/.local/share/color-schemes and /usr/share/color-schemes, and your ~/.config/Trolltech.conf, listed as "Trolltech.conf (yours)".
Qt 5, Qt 6 KDE color schemes in ~/.local/share/color-schemes and /usr/share/color-schemes, and qt5ct's or qt6ct's palettes in ~/.config/qt5ct/colors and /usr/share/qt5ct/colors (or the same for qt6ct), listed with "(qt5ct)" or "(qt6ct)" after the name.
xtk The themes in Palette's themes folder, ~/.config/palette/themes/, and xtk themes installed as GTK themes are, in a theme folder's xtk/.
Window Manager Openbox themes in the GTK theme folders above, listed with "(Openbox)", and the styles in /usr/share/fluxbox/styles, /usr/share/blackbox/styles, ~/.fluxbox/styles and ~/.blackbox/styles, listed with "(Fluxbox)" or "(Blackbox)".

A theme is shown by its name, with a word after it that says why it is in the list:

Shown as Means
Name (preset) One of Palette's presets.
Name An installed theme.
Name (opened) A theme opened with File > Open from somewhere else.
Name (saved) A theme Palette saved.
Name (file gone) Its file is not there any more. The colors shown are the ones Palette kept; Save As writes them again.
... (edited) The theme shown has changes that are not saved.
Toolkit Presets
GTK2 Default (Raleigh), MS-Windows Classic, Clearlooks, Redmond
GTK3 Adwaita, Adwaita Dark, Arc
GTK4 Default, Default Dark
TQt 3 Plastik (TDE's default) and the 48 other color schemes TDE ships: Atlas Green, BeOS, Keramik, Platinum, Redmond XP, the Jewels and Seasons sets and more
Qt 4 The palettes of Qt 4's own styles: Plastique, Cleanlooks, Windows, Motif, CDE
Qt 5, Qt 6 Qt Light, Qt Dark (Qt 6's own dark palette)
xtk Chocolate, Dark, Ember, Forest, Gold, Graphite, Light, Midnight, Ocean, Rose, Rust, Slate, Teal, Violet
Window Manager Blue, Graphite, Olive, Wheat, Dark

The GTK Dark presets are the themes' real dark variants, Adwaita's and GTK4 Default's own dark stylesheets, not the light ones with darker colors. The GTK2 presets reproduce only those themes' colors; their engines are the Engine drop-down's to choose. The Qt presets are colors only; the Engine drop-down picks the widget style.

Apply To

Apply To... puts the theme shown, a preset or your edits, onto the other toolkits. Choose All Toolkits or one of them. What goes over is what they have in common:

Between What is carried
Any two toolkits The colors every toolkit names in its own way: the window and its text, fields and their text, buttons and their text, the selection, disabled text, links and visited links, tooltips, borders, error and success, hover and pressed.
GTK3 and GTK4 Also every color variable, zone and effect they share by name.
TQt 3, Qt 4, Qt 5, Qt 6 Also every role and group, zone (class palettes too), effect and KDE color set they share.

A color goes over only where it changes how the target looks. A target color that its own formula already makes keeps the formula, so a later Shift+drop there still works it out again. A dark window color gives GTK3 and GTK4 their dark stylesheets. Each toolkit keeps its own engine or style. Not carried: GTK's zones to other kinds of toolkit (they share no selectors), GTK2's widget class colors, gradients between kinds, fonts and settings. Apply To is one Undo step, and a target with unsaved changes is asked about first.

Undo, Redo and Reset

  • Undo and Redo (also Ctrl+Z, and Ctrl+Shift+Z or Ctrl+Y, when no text field is being typed in) step back and forward through your edits: drops, Apply To, Import As, a style sheet read with File > Open, the Style panel's changes and reverts, Reset. Palette keeps the last 32 steps.
  • There is one history for all the toolkits, not one for each. Each step holds every toolkit's theme, so Undo always takes back the last edit you made, in whichever toolkit you made it. Palette does not switch to that toolkit: if you edit Qt 5, then switch to GTK3 and press Undo, the Qt 5 edit is taken back and the GTK3 preview does not change. Switch back to Qt 5 to see it.
  • Undo and Redo bring back the colors, and the theme file a toolkit was opened from when Reset, Import As or Apply To let go of it. The engine or style chosen, and its settings, stay as they are.
  • Choosing a preset, an installed theme or an engine is not an edit. It does not make the theme unsaved and is not an Undo step. A preset cannot be undone: Undo goes on through the other toolkits' edits, but never brings back the theme the preset replaced. Opening a theme, from the Theme list or with File > Open, clears the whole history, every toolkit's. Undoing back to what was saved makes the theme count as saved again.
  • Reset asks first, then discards every change, the engine or style and its settings, and the theme that was opened, and shows the toolkit's first preset. Undo after Reset brings back the colors and the opened theme, so Save writes where it did before, but not the engine or style.

3. How a dropped color finds its part

A swatch dropped on the preview: a plain drop colors the zone under the pointer, Shift+drop sets the theme color it follows, Ctrl+drop on Qt sets the role for one widget class, and the mouse wheel while dragging steps through the widget's other zones

What happens to a swatch dropped on GTK3, GTK4, the Qt versions, xtk and the window managers. GTK2 works with its grid instead (see below).

Any swatch can be dropped: the Picker's big swatch, a Harmony swatch, a favorite or the gradient swatch. A dragged swatch hangs from its top left corner, which marks where it lands. While a part is locked in the Style panel, a drop anywhere on the preview colors the locked part instead; see The Style Panel.

4. GTK3 and GTK4

Drag any swatch straight onto any part of the widgets. Every element, state and color property the theme colors is its own drop zone: a button's background apart from the window's, a hovered button apart from a pressed one, text apart from borders.

  • While you drag, the zone under the pointer is outlined (a text color by one box around its whole block of text, not each letter), and the status bar at the bottom of the window names it, for example button:hover - background, and the theme color it follows (bg_color, fg_color, borders_color and so on). When the mouse wheel has more parts to step through, it also says where you are, as in "2 of 5, wheel for more".
  • A drop colors only that zone.
  • A Shift+drop sets the theme color the zone follows, so everything that follows it changes, and so does what the theme works out from it (hover shades, borders, backdrop colors), exactly as the theme computes them. In GTK4 the colors followed are the Default theme's.
  • The mouse wheel while dragging steps through everything else of that element: its other states (hover, pressed, checked, selected, disabled, the unfocused window, and in GTK4 also focus-visible and focus-within), its other parts (text, border, shadow, focus outline, text cursor, underline, the success, warning and error colors of symbolic icons) and the parts inside it (an entry's selected text, a button's label). It also reaches parts the theme leaves transparent and states it does not color separately.
  • The gradient swatch drops onto backgrounds.
  • An opened theme's own stylesheet adds its rules as zones too, named "set by" and the theme's name.
  • The widgets flicker once when a drag first reaches them, while Palette maps the zones.

Each toolkit keeps its own colors: switching between GTK3 and GTK4 loses nothing.

Themes with SVG images (check marks, radio dots, slider handles) show them: the previews have an SVG loader built on xtk's own SVG code.

SVG check boxes of the Gruvbox theme

The SVG check boxes and radio buttons of an installed GTK3 theme.

Some themes keep their stylesheets in a gtk.gresource bundle; Palette unpacks it into a plain copy first. See Theme Files.

5. xtk

The same as GTK3. Each widget's color key is a zone, named by the widget and its key (button - hover-background). A Shift+drop sets the role the key follows, the wheel steps through the widget's other keys, and the gradient swatch makes a background a gradient. See xtk Themes.

6. GTK2

A GTK2 theme is a grid of colors for each state. The grid is above the widgets:

  • Its rows are the states Normal, Active, Prelight, Selected and Insensitive. Its columns are Bg, Fg, Base and Text, and the button's own, Btn Bg and Btn Fg (the Selected row has no button cells). Drag a swatch onto a cell to set it.
  • Click a cell to see what it colors: it blinks, together with every part of the widgets it paints.
  • A swatch dropped straight onto a widget colors only that widget class, every GtkEntry or every GtkButton, in the grid color the spot takes from the default style. The grid stays what every other class uses.
  • The gradient swatch dropped on a widget becomes its class's background image (GTK2's bg_pixmap), made the size of that widget. A saved theme gets the image beside its gtkrc.

A gradient as the GtkButton background

The gradient swatch dropped on a GTK2 button: every GtkButton takes it as its background image.

GTK2's own style properties (cursor and link colors, tree view row colors, focus lines, scroll bar and check box sizes, shadow types) are in the Style panel's settings list with every engine; see Engines and Styles.

7. Qt: TQt 3, Qt 4, Qt 5 and Qt 6

Qt draws from its palette: color roles (Window, Button, Text, Highlight and so on) in three groups, Active, Inactive (a window without the focus; an embedded window usually shows this one) and Disabled. TQt 3 has 16 roles, Qt 4 has 20, Qt 5 has 21 (with PlaceholderText) and Qt 6 has 22 (with Accent, for checked and progress indicators, which follows Highlight).

  • A drop on any part of the widgets: the role and group painting it is outlined and named (Inactive - Button), and the drop sets it.
  • The mouse wheel goes through every role painting that spot (a button's face, its label, its frame), and then those roles in the other groups.
  • A Shift+drop sets the base color the spot follows (window, button, text, disabled text and so on: Fusion's in Qt 5 and Qt 6, Plastique's in Qt 4, Plastik's in TQt 3): every role and group using it changes, and the shades Qt works out from it follow too (Light, Mid, Dark, Shadow), as Qt computes them.
  • A Ctrl+drop sets the role for that widget class only, every QPushButton for example, as QApplication::setPalette(palette, "QPushButton") does.
  • The Qt widgets do not flicker: the program maps its own parts.

Many Qt styles draw with their own colors unless asked to use Palette's; see the Colors setting in Engines and Styles. With Kvantum showing a theme, that theme's own colors are the drop zones; see Kvantum themes.

TQt 3

TQt 3 builds its palette as TDE does: Light, Mid, Dark and Midlight follow Window, so a Shift+drop on Window works them out again. Its presets are the color schemes TDE ships. It has no KDE color set grid and no style sheets (the Style panel's other properties do not apply). Its theme file is TQt's qtrc (what TDE writes for programs outside it) or a TDE color scheme (.kcsrc).

Qt 4

Qt 4's theme file is Trolltech.conf, what qtconfig writes. In Qt 4 a palette set for the desktop replaces any style's own, so Qt 4's own styles always draw with Palette's colors. Its default style is Plastique.

The KDE color sets (Qt 4, Qt 5, Qt 6)

The grid above the Qt widgets, headed "KDE colors", holds a KDE color scheme's sets, which a .colors file saves:

  • Rows: Window, View, Button, Selection, Tooltip, Complementary, Header, and Effects, WM (the colors of the inactive and disabled effects, and the window title colors).
  • Columns: Bg, Bg Alt, Fg, Inactive, Active, Link, Visited, Negative, Neutral, Positive, Focus, Hover.

Drop a swatch on a cell to set it. Only the Breeze style (Qt 6) draws with these sets, live, as Plasma does, and only with its own colors (its Colors setting at "The style's own"). There a click on a cell makes it blink in the preview. With any other style, or Breeze with Palette's colors, the grid is greyed: it does not change the preview, and a click or a drop on it says why. The sets are still saved in .colors files.

The Effects, WM row's first two cells are the exception: they are the colors KDE's inactive and disabled effects mix in (Fade and Tint), and they work with every style that draws with Palette's colors, as the effects do. The effects themselves are in the Style panel's settings list; see Engines and Styles.

The KDE color sets grid with the Breeze style

The KDE color sets with Breeze, which draws from them.

8. Window Manager

One theme for Openbox, Blackbox and Fluxbox; the Engine drop-down says which one the preview draws and Save writes. Each part's colors are zones of their own (window.active.title - text.color), a plain swatch makes a part solid, and the gradient swatch gives it a window manager gradient. See Window Manager Themes.

9. Finding a color: Ctrl+click

Ctrl+click any part of a widget to find out what colors it. In GTK3, GTK4, the Qt versions, xtk and the window managers the zone is outlined for two seconds and named in the status bar; in GTK2 the grid cell blinks, together with everything else it paints. The widgets may flicker briefly while Palette works it out. Hovered widgets show their hover colors.

10. Known limitations

  • The GTK3 and GTK4 widgets flicker once when a drag first reaches them, while Palette maps the zones.
  • GTK2 shows one state at a time, its grid's rows. GTK2 themes have no colors for a mixed (half-checked) state or an unfocused window.
  • The previews are the toolkits' demo programs: a widget none of them has cannot be previewed.
  • The SVG images of themes are drawn by xtk's own SVG renderer. It draws shapes, paths, gradients, transforms and style attributes. It draws text in one plain sans-serif font only, and it does not draw filters, masks, clip paths, patterns, embedded images, reused (use) elements or <style> sheets.