Skip to content

GUI Theme

App: apps/gui_theme/

A live theme editor: two panels side by side — controls on the left, a preview of styled widgets on the right. All style changes apply immediately to the Nuklear backend.

Terminal window
% ./plume3d gui_theme
ControlMethodNotes
Theme togglesetTheme("dark"/"light")Switches all colors
Accent colorsetAccentColor(r, g, b)0–255 sliders for R/G/B
Corner roundingsetRounding(pixels)0 = sharp, 20+ = pill
Window alphasetWindowAlpha(alpha)0–1; controls translucency
Font sizesetFontSize(size)Scales current font
Font switchloadFont(path, size, name) + setFont(name, size)Load TTF and activate
// Toggle dark/light
Gui.setTheme(_isDark ? "dark" : "light")
// Accent color (0-255 int sliders)
_accentR = Gui.sliderInt(0, _accentR, 255, 1)
_accentG = Gui.sliderInt(0, _accentG, 255, 1)
_accentB = Gui.sliderInt(0, _accentB, 255, 1)
Gui.setAccentColor(_accentR, _accentG, _accentB)
// Rounding (pixel radius)
_rounding = Gui.sliderInt(0, _rounding, 20, 1)
Gui.setRounding(_rounding)
// Window alpha (0-1)
_alpha = Gui.sliderFloat(0, _alpha, 1, 0.01)
Gui.setWindowAlpha(_alpha)
// Load a custom font
Gui.loadFont("fonts/inter.ttf", 16, "inter")
Gui.setFont("inter", 16)
  • GuisetTheme, setAccentColor, setRounding, setWindowAlpha, setFont, setFontSize, loadFont.
  • GuisliderFloat, sliderInt (used as color/value controls).