Enum Class SyntaxHighlighter.HighlightTheme

java.lang.Object
java.lang.Enum<SyntaxHighlighter.HighlightTheme>
co.mindus.utils.SyntaxHighlighter.HighlightTheme
All Implemented Interfaces:
Serializable, Comparable<SyntaxHighlighter.HighlightTheme>, Constable
Enclosing class:
SyntaxHighlighter

public static enum SyntaxHighlighter.HighlightTheme extends Enum<SyntaxHighlighter.HighlightTheme>
Available CSS themes for syntax-highlighted code blocks.

Each theme corresponds to a CSS file stored as a classpath resource. The CSS styles target elements with hljs-* classes (e.g. hljs-keyword, hljs-string, hljs-comment) produced by the highlighting engine.

Themes are organized into curated and extended sets. Each theme is classified as light, dark, or neutral.

Curated Themes (16)

Curated light themes
ConstantDescription
ATOM_ONE_LIGHTAtom editor — clean, warm tones
DEFAULTStandard highlight.js — minimal
GITHUBGitHub code rendering
INTELLIJ_LIGHTJetBrains IntelliJ IDEA
STACKOVERFLOW_LIGHTStack Overflow light
TOKYO_NIGHT_LIGHTSoft pastel Tokyo Night
VSVisual Studio classic
XCODEApple Xcode IDE
Curated dark themes
ConstantDescription
ATOM_ONE_DARKAtom editor dark palette
GITHUB_DARKGitHub dark mode
MONOKAISublime Text classic
NIGHT_OWLAccessibility-optimized dark
NORDArctic-inspired cool tones
STACKOVERFLOW_DARKStack Overflow dark
TOKYO_NIGHT_DARKDeep blue-black with vivid accents
VS2015Visual Studio 2015 / VS Code dark

Extended Themes (61)

An additional 61 themes from the highlight.js catalog, including popular styles such as Dracula, Gruvbox, Solarized, Android Studio, A11y (accessibility), and many more. See the individual enum constants for descriptions.

Theme CSS can be loaded without instantiating the highlighter via SyntaxHighlighter.loadThemeCss(HighlightTheme).

Author:
Christopher Mindus
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A11y Dark — accessibility-focused dark theme with high contrast.
    A11y Light — accessibility-focused light theme with high contrast.
    Agate — bold dark theme with vivid syntax colors.
    An Old Hope — Star Wars-inspired dark theme with warm retro colors.
    Android Studio — dark theme matching Android Studio's Darcula scheme.
    Arduino Light — light theme for Arduino IDE style.
    Arta — dark theme with desaturated earth-tone syntax colors.
    Ascetic — ultra-minimal light theme with almost no color.
    Atom One Dark — hugely popular dark theme from the Atom editor.
    Atom One Dark Reasonable — a more muted variant of Atom One Dark.
    Atom One Light — clean, warm light theme from the Atom editor family.
    Brown Paper — a warm brown mid-tone theme resembling aged paper.
    CodePen Embed — dark theme matching CodePen's embedded code style.
    Color Brewer — light theme using ColorBrewer palette for data visualization.
    Dark — the generic dark theme from highlight.js.
    Default — the standard highlight.js theme; light gray background.
    Devibeans — a deep black dark theme with vivid accent colors.
    Docco — light theme inspired by the Docco documentation generator.
    Dracula — popular dark theme with purple and cyan accents on deep charcoal.
    Far — dark blue theme inspired by the FAR Manager file manager.
    Felipec — a minimalist dark theme with muted colors.
    Foundation — light theme with Zurb Foundation styling.
    GitHub — the familiar light theme from GitHub's code rendering.
    GitHub Dark — GitHub's official dark mode code rendering.
    GitHub Dark Dimmed — a softer, less contrasty variant of GitHub Dark.
    GML — dark theme for GameMaker Language style.
    Google Code — light theme inspired by old Google Code syntax highlighting.
    Gradient Dark — dark theme with subtle gradient backgrounds.
    Gradient Light — light theme with subtle gradient backgrounds.
    Grayscale — monochrome light theme using only gray tones.
    Gruvbox Dark — retro, earthy dark palette with warm tones.
    Gruvbox Light — retro, earthy light palette with warm tones.
    Hybrid — a dark theme blending multiple color palettes.
    IDEA — IntelliJ IDEA classic light scheme.
    IntelliJ Light — inspired by JetBrains IntelliJ IDEA's default scheme.
    IR Black — a classic dark terminal-style theme.
    ISBL Editor Dark — dark variant of the ISBL editor theme.
    ISBL Editor Light — light variant of the ISBL editor theme.
    Kimbie Dark — warm dark theme with brown-orange tones.
    Kimbie Light — warm cream-toned light theme.
    Lightfair — bright, clean light theme with blue accents.
    Lioshi — a dark theme with green and cyan accents.
    Magula — soft light theme with muted colors.
    Mono Blue — light theme using only shades of blue.
    Monokai — the iconic dark theme originating from Sublime Text.
    Monokai Sublime — the Monokai variant popularized by Sublime Text.
    Night Owl — a dark theme optimized for accessibility and contrast.
    NNFX Dark — dark variant of the No Nonsense FX theme.
    NNFX Light — light variant of the No Nonsense FX theme.
    Nord — an elegant arctic-inspired dark color palette.
    Obsidian — a dark theme with olive and amber accents.
    Panda Syntax Dark — dark variant of the popular Panda theme.
    Panda Syntax Light — light variant of the popular Panda theme.
    Paraiso Dark — dark variant with warm tropical-inspired colors.
    Paraiso Light — light variant with warm tropical-inspired colors.
    Pojoaque — a dark Solarized-like theme with teal backgrounds.
    PureBasic — light theme styled after the PureBasic IDE.
    Qt Creator Dark — dark variant of the Qt Creator IDE theme.
    Qt Creator Light — light variant of the Qt Creator IDE theme.
    Rainbow — a vivid dark theme with colorful syntax highlighting.
    RouterOS — light theme inspired by MikroTik RouterOS style.
    School Book — playful light theme with a notebook-paper feel.
    Shades of Purple — a vibrant purple-toned dark theme.
    Solarized Dark — Ethan Schoonover's carefully designed dark palette.
    Solarized Light — Ethan Schoonover's carefully designed light palette.
    Srcery — a dark theme inspired by the Gruvbox and Apprentice palettes.
    Stack Overflow Dark — the dark theme from Stack Overflow.
    Stack Overflow Light — the clean light theme from Stack Overflow.
    Sunburst — a classic dark theme with warm highlight colors.
    Tokyo Night Dark — a deep blue-black theme with vivid accents.
    Tokyo Night Light — soft pastel light variant of the Tokyo Night family.
    Tomorrow Night Blue — a deep blue dark theme from the Tomorrow family.
    Tomorrow Night Bright — a vivid dark theme from the Tomorrow family.
    Visual Studio — classic Visual Studio light color scheme.
    VS 2015 — Visual Studio 2015 / VS Code dark theme.
    Xcode — Apple's Xcode IDE default light theme.
    XT256 — a retro dark theme inspired by vintage terminal displays.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the CSS file name without extension (e.g.
    forName(String fileName)
    Finds a theme by its CSS file name (case-insensitive).
    Returns the human-readable display name for this theme.
    boolean
    Returns true if this theme is in the curated set.
    boolean
    Returns true if this is a dark theme.
    boolean
    Returns true if this is a light theme.
    boolean
    Returns true if this is a neutral (mid-tone) theme.
    Returns the classpath resource path for this theme's CSS file.
    Returns which set this theme belongs to.
    Returns the theme type classification.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait