Google is committed to advancing racial equity for Black communities. See how.

CheckboxColors

@Stable interface CheckboxColors
androidx.compose.material.CheckboxColors

Represents the colors used by the three different sections (checkmark, box, and border) of a Checkbox or TriStateCheckbox in different states.

See CheckboxConstants.defaultColors for the default implementation that follows Material specifications.

Summary

Public methods
abstract Color
borderColor(enabled: Boolean, state: ToggleableState)

Represents the color used for the border of the checkbox, depending on enabled and state.

abstract Color
boxColor(enabled: Boolean, state: ToggleableState)

Represents the color used for the box (background) of the checkbox, depending on enabled and state.

abstract Color

Represents the color used for the checkmark inside the checkbox, depending on state.

Public methods

borderColor

abstract fun borderColor(
    enabled: Boolean,
    state: ToggleableState
): Color

Represents the color used for the border of the checkbox, depending on enabled and state.

Parameters
enabled: Boolean whether the checkbox is enabled or not
state: ToggleableState the ToggleableState of the checkbox

boxColor

abstract fun boxColor(
    enabled: Boolean,
    state: ToggleableState
): Color

Represents the color used for the box (background) of the checkbox, depending on enabled and state.

Parameters
enabled: Boolean whether the checkbox is enabled or not
state: ToggleableState the ToggleableState of the checkbox

checkmarkColor

abstract fun checkmarkColor(state: ToggleableState): Color

Represents the color used for the checkmark inside the checkbox, depending on state.

Parameters
state: ToggleableState the ToggleableState of the checkbox