Skip to content

GaldurTheme

classclient onlysince 0.1.0

com.galdurstudio.galdurui.api.theme.GaldurTheme

Colours and spacings of the Galdur UI theme.

Values come from assets/galdurui/theme.json and are reloaded with the game resources (F3+T, or a resource pack change). Read them every frame or every init(); never cache them in a static final field. Colours are packed ARGB (0xAARRGGBB), the format Minecraft's rendering methods expect.

Example.java
int accent = GaldurTheme.accent();int custom = GaldurTheme.colorOrDefault("mymod_energy", 0xFF3FC1D9);
public final class GaldurTheme
PACKAGEapi.theme
SIDEclient only
THREADclient thread

Fields 19

BACKGROUND

static
public static final String BACKGROUND = "background"

Main screen background (charcoal).

SURFACE

static
public static final String SURFACE = "surface"

Background of elements placed on the main background (lists, fields).

TEXT

static
public static final String TEXT = "text"

Main text colour (cream).

TEXT_MUTED

static
public static final String TEXT_MUTED = "text_muted"

Secondary, less contrasted text.

ACCENT

static
public static final String ACCENT = "accent"

Accent colour at rest (redstone).

ACCENT_HOVER

static
public static final String ACCENT_HOVER = "accent_hover"

Accent colour under the mouse or keyboard focus.

ACCENT_PRESSED

static
public static final String ACCENT_PRESSED = "accent_pressed"

Accent colour while pressed.

EMBER

static
public static final String EMBER = "ember"

Warm secondary colour, for highlights (ember).

PANEL_PADDING

static
public static final String PANEL_PADDING = "panel_padding"

Inner margin of a panel, between its edge and its contents.

GAP

static
public static final String GAP = "gap"

Gap between two neighbouring layout elements.

BUTTON_PADDING_X

static
public static final String BUTTON_PADDING_X = "button_padding_x"

Horizontal margin between a button edge and its label.

BUTTON_MIN_WIDTH

static
public static final String BUTTON_MIN_WIDTH = "button_min_width"

Minimum width of a button sized from its label.

BUTTON_HEIGHT

static
public static final String BUTTON_HEIGHT = "button_height"

Height of a button.

LIST_ROW_HEIGHT

static
public static final String LIST_ROW_HEIGHT = "list_row_height"

Height of a scrolling list row, text included.

SCROLLBAR_WIDTH

static
public static final String SCROLLBAR_WIDTH = "scrollbar_width"

Width of a scrollbar (lists and item grids).

FIELD_HEIGHT

static
public static final String FIELD_HEIGHT = "field_height"

Height of a text field (search field).

TAB_HEIGHT

static
public static final String TAB_HEIGHT = "tab_height"

Height of a tab row, bottom line included.

TAB_PADDING_X

static
public static final String TAB_PADDING_X = "tab_padding_x"

Horizontal margin between a tab edge and its title.

PROGRESS_HEIGHT

static
public static final String PROGRESS_HEIGHT = "progress_height"

Height of a progress bar, frame included.

Methods 23

color

static
public static int color(String key)

PARAMETERS

keyStringcolour name; see the constants of this class

RETURNSint — the ARGB colour of key

colorOrDefault

static
public static int colorOrDefault(String key, int fallback)

PARAMETERS

keyString—
fallbackint—

RETURNSint — the ARGB colour of key, or fallback if the theme does not define it

has

static
public static boolean has(String key)

PARAMETERS

keyString—

RETURNSboolean — true if the current theme defines the colour key

background

static
public static int background()

RETURNSint — the BACKGROUND colour, ARGB

surface

static
public static int surface()

RETURNSint — the SURFACE colour, ARGB

text

static
public static int text()

RETURNSint — the TEXT colour, ARGB

textMuted

static
public static int textMuted()

RETURNSint — the TEXT_MUTED colour, ARGB

accent

static
public static int accent()

RETURNSint — the ACCENT colour, ARGB

accentHover

static
public static int accentHover()

RETURNSint — the ACCENT_HOVER colour, ARGB

accentPressed

static
public static int accentPressed()

RETURNSint — the ACCENT_PRESSED colour, ARGB

ember

static
public static int ember()

RETURNSint — the EMBER colour, ARGB

spacing

static
public static int spacing(String key)

PARAMETERS

keyStringspacing name; see the constants of this class

RETURNSint — the spacing of key, in GUI pixels

panelPadding

static
public static int panelPadding()

RETURNSint — the PANEL_PADDING spacing, in pixels

gap

static
public static int gap()

RETURNSint — the GAP spacing, in pixels

buttonPaddingX

static
public static int buttonPaddingX()

RETURNSint — the BUTTON_PADDING_X spacing, in pixels

buttonMinWidth

static
public static int buttonMinWidth()

RETURNSint — the BUTTON_MIN_WIDTH spacing, in pixels

buttonHeight

static
public static int buttonHeight()

RETURNSint — the BUTTON_HEIGHT spacing, in pixels

listRowHeight

static
public static int listRowHeight()

RETURNSint — the LIST_ROW_HEIGHT spacing, in pixels

scrollbarWidth

static
public static int scrollbarWidth()

RETURNSint — the SCROLLBAR_WIDTH spacing, in pixels

fieldHeight

static
public static int fieldHeight()

RETURNSint — the FIELD_HEIGHT spacing, in pixels

tabHeight

static
public static int tabHeight()

RETURNSint — the TAB_HEIGHT spacing, in pixels

tabPaddingX

static
public static int tabPaddingX()

RETURNSint — the TAB_PADDING_X spacing, in pixels

progressHeight

static
public static int progressHeight()

RETURNSint — the PROGRESS_HEIGHT spacing, in pixels

© 2026 Galdur Studio · galdurstudio.com · Discord · LGPL-3.0-onlyNot an official Minecraft product. Not approved by or associated with Mojang or Microsoft.