Companion

object Companion

Properties

Link copied to clipboard

All bundled themes provided by the library.

Link copied to clipboard

Bundled themes designed for dark backgrounds. Precomputed for zero runtime allocation.

Link copied to clipboard

Bundled themes designed for light backgrounds. Precomputed for zero runtime allocation.

Functions

Link copied to clipboard

Alias for draculaDark. Makes the Dracula dark theme discoverable under the Alucard family name.

Link copied to clipboard

Built-in Alucard light theme.

Link copied to clipboard

Built-in Atom One Dark theme.

Link copied to clipboard

Built-in Atom One Light theme.

Link copied to clipboard

Built-in Dracula dark theme.

Link copied to clipboard

Alias for alucardLight. Makes the Alucard light theme discoverable under the Dracula family name.

Link copied to clipboard

Finds a bundled theme descriptor by its stable id, or returns null if not found.

Link copied to clipboard
fun fromAsset(context: Context, assetPath: String, name: String): HighlightTheme

Custom theme loaded from a Highlight.js CSS file in the app's assets/ folder.

Link copied to clipboard
fun fromColorMap(name: String, colorMap: Map<String, SpanStyle>, backgroundColor: Color? = null, defaultTextColor: Color? = null): HighlightTheme

Custom theme from a precomputed color map.

Link copied to clipboard
fun fromCss(cssText: String, name: String): HighlightTheme

Custom theme from raw Highlight.js CSS text.

Link copied to clipboard

Built-in GitHub Dark theme.

Link copied to clipboard

Built-in GitHub Light theme.

Link copied to clipboard

Built-in Base16 Tomorrow light theme.

Link copied to clipboard

Built-in Base16 Tomorrow Night dark theme.