Dark mode - CottonMC/LibGui GitHub Wiki

LibGui supports light and dark themes for its widgets. Like in vanilla, the light mode is the default setting, but it can be changed globally as well as in a specific GUI.

Global setting

Go to LibGui's settings screen where there is a toggle button to change between the light and dark modes.

LibGui settings, showing the dark mode setting

Per-screen

The dark mode setting can be overridden for specific GUIs. To force light mode or dark mode, you can override isDarkMode in your GuiDescription class:

@Override
public TriState isDarkMode() {
    // TRUE to force dark mode, FALSE to force light mode, DEFAULT to use the global setting
    return TriState.TRUE;
}