Skip to content

system.registerTheme

since 26.1.0

Register a Lua Theme.

system.registerTheme(params)

Parameters

Name Type Required Description
params table yes see the fields below

Fields of params:

  • key (string): unique key, with 7 chars max
  • name (string or function): theme name
  • focusStyle (string, default="invert"): focus style ("outline", "invert", or "color")
  • borderWidth (number, default=2): widgets border width
  • toolbarBackground (bitmap): top toolbar background bitmap
  • toolbarLogo (bitmap): top toolbar logo
  • colors (table): theme colors
  • roundButtons (boolean, optional): whether to use round buttons or not

Returns

Nothing.

Examples

From the official Ethos documentation
local function init()
    system.registerTheme({
      key="dark2",
      name="Dark alternative"
      focusStyle="outline",
      borderWidth=3,
      roundButtons=false,
    })
end

return {init=init}

Used in