Skip to main content

Themes

Built-in theme presets and a helper for deriving custom themes. Apply a theme at construction (Plottr.new(frame, { theme = Themes.Light })) or later with Graph:setTheme.

Properties

Dark

This item is read only and cannot be modified. Read Only
Themes.Dark: Theme

High-contrast dark preset. This is the default theme.

Light

This item is read only and cannot be modified. Read Only
Themes.Light: Theme

Light preset for bright interfaces.

Midnight

This item is read only and cannot be modified. Read Only
Themes.Midnight: Theme

Deep-blue preset with a neon palette.

Functions

extend

Themes.extend(
baseTheme,--

The preset to start from

overridesPartialTheme--

Fields to replace

) → Theme

Returns a copy of base with any fields in overrides replaced.

local brand = Themes.extend(Themes.Dark, {
	name = "Brand",
	palette = { Color3.fromRGB(255, 115, 0) },
	font = Font.fromName("Montserrat", Enum.FontWeight.SemiBold),
	textSize = 14,
})
Show raw api
{
    "functions": [
        {
            "name": "extend",
            "desc": "Returns a copy of `base` with any fields in `overrides` replaced.\n\n```lua\nlocal brand = Themes.extend(Themes.Dark, {\n\tname = \"Brand\",\n\tpalette = { Color3.fromRGB(255, 115, 0) },\n\tfont = Font.fromName(\"Montserrat\", Enum.FontWeight.SemiBold),\n\ttextSize = 14,\n})\n```",
            "params": [
                {
                    "name": "base",
                    "desc": "The preset to start from",
                    "lua_type": "Theme"
                },
                {
                    "name": "overrides",
                    "desc": "Fields to replace",
                    "lua_type": "PartialTheme"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Theme"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 110,
                "path": "src/Themes.luau"
            }
        }
    ],
    "properties": [
        {
            "name": "Dark",
            "desc": "High-contrast dark preset. This is the default theme.",
            "lua_type": "Theme",
            "readonly": true,
            "source": {
                "line": 21,
                "path": "src/Themes.luau"
            }
        },
        {
            "name": "Light",
            "desc": "Light preset for bright interfaces.",
            "lua_type": "Theme",
            "readonly": true,
            "source": {
                "line": 47,
                "path": "src/Themes.luau"
            }
        },
        {
            "name": "Midnight",
            "desc": "Deep-blue preset with a neon palette.",
            "lua_type": "Theme",
            "readonly": true,
            "source": {
                "line": 73,
                "path": "src/Themes.luau"
            }
        }
    ],
    "types": [],
    "name": "Themes",
    "desc": "Built-in theme presets and a helper for deriving custom themes. Apply a\ntheme at construction (`Plottr.new(frame, { theme = Themes.Light })`) or\nlater with [Graph:setTheme].",
    "source": {
        "line": 12,
        "path": "src/Themes.luau"
    }
}