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), val focusedCellBorder: Color = Color(0xFF1976D2), val editingCell: Color = Color(0xFFFFFFFF), val invalidCellBorder: Color = Color(0xFFD32F2F), val selectedCell: Color = Color(0x331976D2), val draggedColumn: Color = Color(0x1F1976D2), val columnDropIndicator: Color = Color(0xFF1976D2), val filterRow: Color = Color(0xFFF7F7F7), val filterField: Color = Color(0xFFFFFFFF))(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), focusedCellBorder: Color = Color(0xFF1976D2), editingCell: Color = Color(0xFFFFFFFF), invalidCellBorder: Color = Color(0xFFD32F2F), selectedCell: Color = Color(0x331976D2), draggedColumn: Color = Color(0x1F1976D2), columnDropIndicator: Color = Color(0xFF1976D2), filterRow: Color = Color(0xFFF7F7F7), filterField: Color = Color(0xFFFFFFFF))

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

The line drawn down the edge a dragged column would land against.

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 draggedColumn: Color

Wash over the header being dragged to a new position, so it is clear which column is on the move. Translucent, so the title still reads.

Link copied to clipboard
val editingCell: Color

Background behind an open cell editor, so the field reads as a field rather than as text that happens to have a caret in it.

Link copied to clipboard
val expandedRow: Color

Background behind the content of an expanded row.

Link copied to clipboard
val filterField: Color

Background of a filter field itself, which sits on filterRow.

Link copied to clipboard
val filterRow: Color

Background of the filter row, under the header. Set a shade off header so the two read as separate rows rather than one tall band.

Link copied to clipboard

Outline drawn around the keyboard-focused cell, once cell-level navigation is on. Drawn on top of the row's own focus marker.

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

Outline replacing focusedCellBorder while the value in an open editor has been rejected by the column's validateEdit.

Link copied to clipboard
val onSurface: Color

Primary content color. Paints the caret in an open cell editor, and is otherwise there 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 selectedCell: Color

Wash over cells inside a selected range. Translucent, so row striping and row selection still read through it. The cell the cursor is on is left unwashed, the way a spreadsheet leaves its active cell.

Link copied to clipboard
val selectedRow: Color

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