DataTableColors

@Immutable
data class DataTableColors(val container: Color = Color(0xFFFAFAFA), val header: Color = Color(0xFFF0F0F0), val divider: Color = Color(0xFFDDDDDD), val selectedRow: Color = Color(0x4D1976D2), val expandedRow: Color = Color(0x80F0F0F0), val onSurface: Color = Color(0xFF1C1C1C), val onSurfaceSecondary: Color = Color(0xFF757575), val checkboxChecked: Color = Color(0xFF1976D2), val checkboxUnchecked: Color = Color(0xFF757575), val checkboxCheckmark: Color = Color.White, val iconTint: Color = Color(0xFF616161), val disabledContent: Color = Color(0xFFBDBDBD), val rowAlternate: Color = Color.Transparent, val hoveredRow: Color = Color(0x1A000000), val focusedRowBorder: Color = Color(0xFF1976D2))(source)

Colors used throughout the DataTable.

All colors have sensible defaults that work without any theming framework. Pass a custom instance to DataTable to match your application's palette.

Text color is not here — it lives on the styles in DataTableTextStyles — so a dark palette means overriding both.

Constructors

Link copied to clipboard
constructor(container: Color = Color(0xFFFAFAFA), header: Color = Color(0xFFF0F0F0), divider: Color = Color(0xFFDDDDDD), selectedRow: Color = Color(0x4D1976D2), expandedRow: Color = Color(0x80F0F0F0), onSurface: Color = Color(0xFF1C1C1C), onSurfaceSecondary: Color = Color(0xFF757575), checkboxChecked: Color = Color(0xFF1976D2), checkboxUnchecked: Color = Color(0xFF757575), checkboxCheckmark: Color = Color.White, iconTint: Color = Color(0xFF616161), disabledContent: Color = Color(0xFFBDBDBD), rowAlternate: Color = Color.Transparent, hoveredRow: Color = Color(0x1A000000), focusedRowBorder: Color = Color(0xFF1976D2))

Properties

Link copied to clipboard
val checkboxChecked: Color

Fill and border of a checked selection checkbox.

Link copied to clipboard

The checkmark drawn inside a checked checkbox.

Link copied to clipboard

Border of an unchecked selection checkbox.

Link copied to clipboard
val container: Color

Background behind the whole table.

Link copied to clipboard
val disabledContent: Color

Pagination arrows that cannot be used from the current page.

Link copied to clipboard
val divider: Color

Row separators, the freeze boundary, and grouped-header underlines.

Link copied to clipboard
val expandedRow: Color

Background behind the content of an expanded row.

Link copied to clipboard
val focusedRowBorder: Color

Marker drawn down the leading edge of the keyboard-focused row.

Link copied to clipboard
val header: Color

Background of the header row and of the footer.

Link copied to clipboard
val hoveredRow: Color

Background of the row under the pointer, also used for icon-button hover highlights in the footer.

Link copied to clipboard
val iconTint: Color

Sort arrows, expand chevrons, and pagination arrows.

Link copied to clipboard
val onSurface: Color

Primary content color, available for callers building custom cells.

Link copied to clipboard

Muted content color, available for callers building custom cells.

Link copied to clipboard
val rowAlternate: Color

Background of every other row. Color.Transparent, the default, turns striping off.

Link copied to clipboard
val selectedRow: Color

Background of a selected row. Usually translucent, so it reads on top of rowAlternate.