TableColors

data class TableColors(val primary: Color = SurfaceColor.Primary, val primaryLight: Color = SurfaceColor.ContainerHighest, val headerText: Color = TextColor.OnSurfaceLight, val headerBackground1: Color = SurfaceColor.ContainerLow, val headerBackground2: Color = SurfaceColor.Container, val cellText: Color = TextColor.OnSurfaceVariant, val disabledCellText: Color = TextColor.OnDisabledSurface, val disabledCellBackground: Color = SurfaceColor.DisabledSurfaceBright, val disabledSelectedBackground: Color = SurfaceColor.DisabledSurface, val tableBackground: Color = SurfaceColor.SurfaceBright, val onPrimary: Color = TextColor.OnPrimary, val selectedCell: Color = SurfaceColor.ContainerHighest)

Data class representing the colors used in the table component.

Constructors

Link copied to clipboard
constructor(primary: Color = SurfaceColor.Primary, primaryLight: Color = SurfaceColor.ContainerHighest, headerText: Color = TextColor.OnSurfaceLight, headerBackground1: Color = SurfaceColor.ContainerLow, headerBackground2: Color = SurfaceColor.Container, cellText: Color = TextColor.OnSurfaceVariant, disabledCellText: Color = TextColor.OnDisabledSurface, disabledCellBackground: Color = SurfaceColor.DisabledSurfaceBright, disabledSelectedBackground: Color = SurfaceColor.DisabledSurface, tableBackground: Color = SurfaceColor.SurfaceBright, onPrimary: Color = TextColor.OnPrimary, selectedCell: Color = SurfaceColor.ContainerHighest)

Properties

Link copied to clipboard

The color of the cell text.

Link copied to clipboard

The background color of disabled cells.

Link copied to clipboard

The color of the text in disabled cells.

Link copied to clipboard

The background color of selected disabled cells.

Link copied to clipboard

The first background color for the header.

Link copied to clipboard

The second background color for the header.

Link copied to clipboard

The color of the header text.

Link copied to clipboard

The color used for text/icons on primary color.

Link copied to clipboard

The primary color.

Link copied to clipboard

The light variant of the primary color.

Link copied to clipboard
Link copied to clipboard

The background color of the table.

Functions

Link copied to clipboard
fun cellTextColor(hasError: Boolean, hasWarning: Boolean, isEditable: Boolean): Color

Returns the appropriate cell text color based on error, warning, and editability states.