# theme/load Load a theme file from disk and return its full parsed map. ## Syntax
[theme/load :dracula]
[theme/load "dracula"]
[theme/load "Dracula"]
[theme/load "path/to/my-theme.dft"]
## Parameters - `name-or-path` — a file stem (keyword or string, e.g. `:dracula` → `dracula.dft`), a display name (matched against the file's `:name` field), or an explicit `.dft` path. ## Directory chain Themes are searched in order, first hit wins per stem: 1. `<project .deft>/local/themes/` — project overrides 2. `<user home>/local/themes/` — user-level themes 3. prelude `:themes :dir` — custom theme directory (a string or a `@{...}` vector of paths) 4. `<stdext mount>/themes/` — shipped defaults 5. `./themes/` — legacy CWD-relative fallback ## Examples
set t [theme/load :dracula]                # by file stem
set t [theme/load "Catppuccin Mocha"]      # by display name
[theme/get $t :ui :bg]                     # → "#1e1e2e"
## Returns The full theme map — every category the file defines (`:name`, `:ui`, `:syntax`, `:help`, `:markdown`, plus any future additions), so themes stay extensible. Returns a `%Err` map when no theme matches or the file does not parse to a map. `theme/load` also records the theme's provenance (file stem, origin directory, writability) in a runtime registry that `theme/save` uses to pick its write target. ## See Also `theme/list`, `theme/save`, `theme/get`, `theme/set`