LogColorScheme

data class LogColorScheme(val verbose: LogLevelColors, val debug: LogLevelColors, val info: LogLevelColors, val warning: LogLevelColors, val error: LogLevelColors, val assert: LogLevelColors, val unknown: LogLevelColors)

The complete set of per-LogLevel colors used by the Console module's UI.

DevView renders inside the host app's MaterialTheme, but log-level colors (a debug teal, a warning yellow, an error red, etc.) are intentionally not derived from MaterialTheme.colorScheme — they need to stay visually distinct and consistent regardless of the host's brand palette. Light and Dark are complete, hand-tuned palettes tested for contrast in each theme; use copy to override individual levels.

Usage

Provide the scheme where your app already configures its MaterialTheme, via com.worldline.devview.consolelogger.theme.LocalLogColorScheme:

MaterialTheme(colorScheme = if (darkTheme) darkColorScheme() else lightColorScheme()) {
CompositionLocalProvider(
LocalLogColorScheme provides if (darkTheme) LogColorScheme.Dark else LogColorScheme.Light
) {
// ...
}
}

Overriding individual levels

LogColorScheme.Dark.copy(
error = LogColorScheme.Dark.error.copy(label = Color.Magenta)
)

See also

Constructors

Link copied to clipboard
constructor(verbose: LogLevelColors, debug: LogLevelColors, info: LogLevelColors, warning: LogLevelColors, error: LogLevelColors, assert: LogLevelColors, unknown: LogLevelColors)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
operator fun get(level: LogLevel): LogLevelColors

Returns the LogLevelColors for the given level.