Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
theme_presets.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <pulp/view/theme.hpp>
4#include <string>
5#include <vector>
6#include <optional>
7
8namespace pulp::view {
9
10// ── Theme Preset System ─────────────────────────────────────────────────────
11// Ports 38 tweakcn-sourced presets (via Solar) with light/dark variants.
12// Each preset defines ~15 semantic UI tokens; the derivation layer auto-generates
13// ~35 additional audio-specific tokens (Knob, Slider, Meter, Waveform, etc.).
14
34
37 std::string id; // Machine-readable key (e.g., "catppuccin")
38 std::string name; // Display name (e.g., "Catppuccin")
41
46};
47
50const std::vector<ThemePreset>& all_presets();
51
53const ThemePreset* find_preset(const std::string& id);
54
56std::vector<std::string> preset_ids();
57
58// ── Derivation Layer ────────────────────────────────────────────────────────
59// Generates a full Pulp Theme from semantic colors using a documented mapping.
60
78
82
83} // namespace pulp::view
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
Theme theme_from_preset(const ThemePreset &preset, bool dark)
Build a complete Theme from a preset for the given appearance.
const ThemePreset * find_preset(const std::string &id)
Look up a preset by id. Returns nullptr if not found.
const std::vector< ThemePreset > & all_presets()
Get all built-in theme presets (37 tweakcn-sourced + "Ink & Signal", Pulp's flagship design language ...
canvas::Color Color
Definition theme.hpp:12
std::vector< std::string > preset_ids()
Get the list of preset ids.
@ dark
Definition appearance_tracker.hpp:11
Theme derive_theme(const SemanticColors &colors)
Derive a complete Theme from semantic colors.
@ colors
colors: map — hex string values.
Definition token_lock.hpp:63
Semantic color tokens from tweakcn/shadcn-ui (the base 11 + 5 chart colors).
Definition theme_presets.hpp:16
Color card
Definition theme_presets.hpp:19
Color border
Definition theme_presets.hpp:25
Color chart2
Definition theme_presets.hpp:29
Color destructive
Definition theme_presets.hpp:24
Color muted
Definition theme_presets.hpp:22
Color background
Definition theme_presets.hpp:17
Color secondary
Definition theme_presets.hpp:21
Color chart3
Definition theme_presets.hpp:30
Color accent
Definition theme_presets.hpp:23
Color chart5
Definition theme_presets.hpp:32
Color input
Definition theme_presets.hpp:26
Color chart4
Definition theme_presets.hpp:31
Color ring
Definition theme_presets.hpp:27
Color primary
Definition theme_presets.hpp:20
Color foreground
Definition theme_presets.hpp:18
Color chart1
Definition theme_presets.hpp:28
A theme preset with light and dark variants.
Definition theme_presets.hpp:36
SemanticColors dark
Definition theme_presets.hpp:40
std::string id
Definition theme_presets.hpp:37
Theme light_overrides
Optional explicit audio token overrides (per-variant).
Definition theme_presets.hpp:44
SemanticColors light
Definition theme_presets.hpp:39
Theme dark_overrides
Definition theme_presets.hpp:45
std::string name
Definition theme_presets.hpp:38
Definition theme.hpp:32