public enum CarColor
- Object
- Enum<CarColor>
- CarColor
ImplementsComparable<CarColor>
A small, head-unit-safe colour palette for
CarAction backgrounds and accents. In-car UIs do not
allow arbitrary ARGB colours (the system tints for legibility and theme/contrast compliance), so
the API exposes named roles that each platform maps to its own car colour
(androidx.car.app.model.CarColor / the CarPlay system tint).Enum constants
DEFAULT | The head unit’s default colour for the element. |
PRIMARY | The app’s primary/accent colour as resolved by the head unit theme. |
RED | A red role, typically for destructive or stop/cancel actions. |
GREEN | A green role, typically for confirm/go actions. |
BLUE | A blue role. |
YELLOW | A yellow/amber role, typically for cautionary actions. |
Methods
public static CarColor[] values() | |
public static CarColor valueOf(String name) |
Inherited methods
Enum constant details
DEFAULT
DEFAULTThe head unit’s default colour for the element.
PRIMARY
PRIMARYThe app’s primary/accent colour as resolved by the head unit theme.
RED
REDA red role, typically for destructive or stop/cancel actions.
GREEN
GREENA green role, typically for confirm/go actions.
BLUE
BLUEA blue role.
YELLOW
YELLOWA yellow/amber role, typically for cautionary actions.
Method details
values
public static CarColor[] values()valueOf
public static CarColor valueOf(String name)