public enum CarColor

  1. Object
  2. Enum<CarColor>
  3. 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

DEFAULTThe head unit’s default colour for the element.
PRIMARYThe app’s primary/accent colour as resolved by the head unit theme.
REDA red role, typically for destructive or stop/cancel actions.
GREENA green role, typically for confirm/go actions.
BLUEA blue role.
YELLOWA yellow/amber role, typically for cautionary actions.

Methods

public static CarColor[] values()
public static CarColor valueOf(String name)

Inherited methods

Enum constant details

DEFAULT

DEFAULT
The head unit’s default colour for the element.

PRIMARY

PRIMARY
The app’s primary/accent colour as resolved by the head unit theme.

RED

RED
A red role, typically for destructive or stop/cancel actions.

GREEN

GREEN
A green role, typically for confirm/go actions.

BLUE

BLUE
A blue role.

YELLOW

YELLOW
A yellow/amber role, typically for cautionary actions.

Method details

values

public static CarColor[] values()

valueOf

public static CarColor valueOf(String name)