OverflowOverflow
UI Library

Theming

Every colour, radius, blur and duration in of_ui is a token. A full set of tokens exports as one short code (OF1-...) that you can pin as your server's default, offer as a preset, or paste into another server.

The settings menu

Players open it with:

/themesettings

They can also import a code straight away, skipping the menu:

/themesettings OF1-fWNj4N8...

Codes are validated and checksummed on import, so a bad paste is rejected rather than applied.

A player's theme is stored per client and survives resource restarts.

Configuration

config/config.lua:

Config.Theme = {
    -- Server default. Players start from this one; Reset returns them to it.
    Default = nil, -- e.g. 'OF1-fWNj/4N8...'

    -- Let players open the menu and keep their own theme.
    AllowPlayerTheming = true,

    -- Tokens the player may not change, by registry path.
    LockedTokens = {},

    -- Themes offered as one-click chips in the menu.
    Presets = {
        -- { label = 'Midnight', code = 'OF1-...' },
    },

    -- Chat command that opens the menu. false for none.
    Command = 'themesettings',

    -- Keybind that opens the menu. false for none.
    Keybind = false,
}
FieldTypeDescription
Defaultstring?Theme code every player starts from. nil uses the built-in defaults.
AllowPlayerThemingboolean?false locks the theme to Default and blocks saving.
LockedTokensstring[]?Token paths the player cannot change, e.g. { 'global.accent', 'global.accentHover' }.
Presetstable[]?{ label, code } chips shown in the menu.
Commandstring|false?Chat command. Omit it entirely and it falls back to themesettings.
Keybindstring|false?Default key for opening the menu.

Pinning your branding

To keep your server's accent colour while letting players change everything else:

Config.Theme = {
    Default = 'OF1-...',      -- your theme code
    AllowPlayerTheming = true,
    LockedTokens = { 'global.accent', 'global.accentHover' },
}

Making a theme

  1. Open /themesettings in game.
  2. Adjust tokens; the preview updates as you go.
  3. Copy the theme code from the export field.
  4. Paste it into Config.Theme.Default, or into Presets as a one-click chip.

Breaking updates

Theme codes are versioned. Regenerate your codes from the settings menu after an update that adds a component, and check the changelog before updating a live server.

Per-call overrides

Some components take their own colour without touching the theme, for cases where the meaning is specific rather than stylistic:

On this page