The style module defines constants for spacing and sizing, as well as classes for Colors and Fonts. Text rendering is handled by Pango and colors are inputted by their HTML code (e.g. #FFFFFFFF)

All the constants are expressed in pixels. They are defined for the XO screen and are usually adapted to different resolution by applying a zoom factor. = < object>

Black = < object>

Color of buttons = < object>

Color of highlighted text = < object>

Fill colour of an inactive button = < object>

Stroke colour of an inactive button = < object>

Default background color of a window = < object>

Background color of selected entry = < object>

Background color of entry = < object>

Color of toolbars = < object>

Fully transparent color = < object>


class, alpha=1.0)

Bases: object

A Color object defines a specific color.

  • color (str) – String in the form #FFFFFF representing the color

  • alpha (double) – transparency of color


Returns GDK standard color


Returns string in the standard html Color format (#FFFFFF)


Returns color encoded as an int, in the form rgba


Returns 4-tuple of red, green, blue, and alpha levels in range 0-1


Returns HTML formatted color, unless the color is completely transparent, in which case returns “none” = 6

Padding is placed around an element = 15

Spacing is placed in-between elements = < object>

Bold font = 24

Height in pixels of bold font = 'Sans Serif'

User’s preferred font face = < object>

Normal font = 24

Height in pixels of normal font = 10

User’s preferred font size


Bases: object

A font defines the style of how the text should be rendered.


desc (str) – a description of the Font object


Returns Pango description of font = 75

allow elements to tile neatly within boundaries of a grid = 110

larger than medium, used in journal empty view = 2

Thickness of a separator line = 82

larger than standard = 60

Max width of text in a palette menu, in chars = 10

Cursor invoked palettes will be placed this far from the cursor = 33

small icon, used in palette menu items = 55

icon that fits within a grid cell = 24

Size of arrow displayed under toolbar buttons to represent their status = 151

larger than large, used in activity pulsing launcher icon = 1.0

scale factor, as float (eg. 0.72, 1.0)

Returns size of units pixels at current zoom level


units (int or float) – size of item at full size