Trace Style And Color Schemes
TraceStyle controls shared visual dimensions and labels. TraceColorScheme decides source-aware
colors for spans, threads, processes, keywords, and dependencies.
import {
DEFAULT_TRACE_COLOR_SCHEME,
DEFAULT_TRACE_STYLE,
makeTraceStyle,
type TraceColorScheme,
type TraceStyle
} from '@deck.gl-community/trace-layers/trace';
TraceStyle
Use DEFAULT_TRACE_STYLE for the standard viewer look. Use makeTraceStyle(...) when a host needs
to change shared dimensions, labels, or typography without forking layout/rendering behavior.
TraceColorScheme
TraceColorScheme can provide:
- keyword presentation
- span fill, border, text, and composite styles
- thread colors
- process background colors
Built-in schemes include DEFAULT_TRACE_COLOR_SCHEME, PERFETTO_TRACE_COLOR_SCHEME, and
PROCESS_TRACE_COLOR_SCHEME. Chrome Trace integrations can use createChromeTraceColorScheme(...).
Related helpers
createTraceColorResolver(...)createTraceGraphColorResolver(...)getReadableSpanBorderColor(...)computeTracePathHighlighting(...)
Pass a scheme to DeckTraceGraph.colorScheme. Keep the scheme source-aware and keep application
state outside it.