dims, colors, and borders

<dim id="border-size">2.0</dim>

<dim id="unlimited">inf</dim>

<color id="left-border-color">

<border id="solid-border">

dimensions specify sizes of various UI elements, A dim element specifies a size in millimeters, which can be fractional, and calculates the number of pixels closest to the given size, taking into account the current theme's scale. This is the same as setting a x::w::dim_arg from the given value. A special value of inf evaluates to a NAN, and used in contexts of specifying an unlimited maximum widget size.

colors define colors in terms of their red, ggreen, bblue, and aalpha (transparency) values. Each component ranges from 0 (none) to 1.0 (maximum intensity). This is the same as setting x::w::color_arg from an x::w::rgb whose values are scaled from 0 to x::w::rgb::maximum with 1.0 as x::w::rgb::maximum.

Other parts of the theme file refer to dimensions and colors by their ids:

<border id="solid-border">

A border element defines a border, effectively initializing a x::w::border_arg from a x::w::border_infomm. The border contains the following elements:


This dimension sets x::w::border_infomm's width.


This dimension sets x::w::border_infomm's height.

<rounded />



This sets x::w::border_infomm's rounded (an empty tag is equivalent to 1).


This dimension sets x::w::border_infomm's hradius.


This dimension sets x::w::border_infomm's vradius.

width_scale, height_scale, hradius_scale, and vradius_scale

These elements' values set x::w::border_infomm's corresponding members.


This color sets x::w::border_infomm's color1. This is the border's primary color.


This color sets x::w::border_infomm's color2. This is an optional secondary color for drawing dashed borders.


This element can appear more than once, and initializes x::w::border_infomm's dashes. This creates a border that's drawn as a dashed line instead of a solid color.


dashes are literal values, not dims; and dashes' values are literal floating point values.

Using dims, colors, and borders from the default theme

Like with all other elements, the relative order of dims, colors, and borders, relative to each other and other elements in the theme file, does not matter, except that the first unique id takes priority over other elements with the same id which get ignored.

ids that are not defined in the theme file are presumed to be referring to the ones specifies by the current default theme.

Derivedcolors, and borders

All theme files can reference the following colors: transparent, with 0 r, g, b, and a values, and the following standard HTML 3.2 colors: black, gray, silver, white, maroon, red, olive, yellow, green, lime, teal, aqua, navy, blue, fuchsia, purple.

<color id="bgcolor" scale="gray" />

<color id="bgcolor2" scale="gray">

<border id="dashed-border" from="solid-border">



Declaring a color with a scale attribute creates a new alias for another color in the theme file. This copies the r, g, b, and a values from the other color, and multiplies them by the values in the scaled alias, if specified. The above example creates a bgcolor2 from a bgcolor, with the red component multiplied by 1.2 (20% higher red channel). The scaled component values get automatically truncated to the range of 0 to 1.

Similarly, declaring a border with a from attribute creates a new border based on another border, with any given values replacing the values from the other border, with one exception: declaring a new color color replaces the color from the original border, and resets the new border's color2, unless the new border also specifies an explicit color2; and specifying the new border's color2 requires explicitly specifying its color, also.

<border id="solid-border" from="dashed-border">


An empty dash in a derived border removes the inherited dashes.