public static enum TextUtils.Theme extends Enum<TextUtils.Theme>
Each theme (except NONE) has a corresponding CSS file stored as a classpath resource at /co/mindus/utils/md/css/<name>.css.
Themes are organized as three light/dark pairs plus a no-CSS option:
| Constant | Brightness | CSS File | Description |
|---|---|---|---|
NONE | — | — | No CSS, bare HTML |
BASIC | Light | basic.css | System fonts, minimal borders |
BASIC_DARK | Dark | basic-dark.css | Muted backgrounds, light text, subtle borders |
MODERN | Light | modern.css | Inter font, refined spacing, soft shadows, accent colors |
MODERN_DARK | Dark | modern-dark.css | Deep slate, blue accents, glowing code blocks |
GITHUB | Light | github.css | GitHub-inspired, rounded code blocks, alternating table rows |
GITHUB_DARK | Dark | github-dark.css | Deep backgrounds, muted borders, blue-tinted accents |
Use toDark() and toLight() to switch between light/dark counterparts. The default theme for TextUtils.parseMarkdownToDocument(String) and the TextUtils.DocumentBuilder is GITHUB.
| Enum Constant and Description |
|---|
BASICMinimal, clean styling with system fonts and subtle borders. |
BASIC_DARKDark variant of BASIC: muted backgrounds, light text, subtle borders. |
GITHUBPolished styling inspired by code-hosting platforms — rounded code blocks, alternating table rows, refined footnotes. |
GITHUB_DARKDark variant of GITHUB: deep backgrounds, muted borders, blue-tinted accents. |
MODERNContemporary light theme with refined spacing, soft shadows, and accent colors. |
MODERN_DARKDark variant of MODERN: deep slate backgrounds, blue accents, glowing code blocks. |
NONENo CSS — produces a bare HTML document. |
| Modifier and Type | Method and Description |
|---|---|
String | getDisplayName()Returns the display name string of the theme. |
String | getFilename()Returns a file-safe string for a document theme in e.g. |
boolean | isDark()Returns true if this is a dark theme. |
boolean | isLight()Returns true if this is a light theme. |
String | resourcePath()Returns the classpath resource path for this theme's CSS, or null for NONE. |
TextUtils.Theme | toDark()Returns the dark counterpart of a light theme, or itself if already dark/NONE. |
TextUtils.Theme | toLight()Returns the light counterpart of a dark theme, or itself if already light/NONE. |
static TextUtils.Theme | valueOf(String name)Returns the enum constant of this type with the specified name. |
static TextUtils.Theme[] | values()Returns an array containing the constants of this enum type, in the order they are declared. |
public static final TextUtils.Theme NONE
public static final TextUtils.Theme BASIC
public static final TextUtils.Theme BASIC_DARK
public static final TextUtils.Theme MODERN
public static final TextUtils.Theme MODERN_DARK
public static final TextUtils.Theme GITHUB
public static final TextUtils.Theme GITHUB_DARK
public static TextUtils.Theme[] values()
for (TextUtils.Theme c : TextUtils.Theme.values()) System.out.println(c);
public static TextUtils.Theme valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getDisplayName()
public String getFilename()
"github-dark").public boolean isLight()
true if this is a light theme.public boolean isDark()
true if this is a dark theme.public String resourcePath()
null for NONE.public TextUtils.Theme toDark()
public TextUtils.Theme toLight()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.