CountryPickerColors

data class CountryPickerColors(val accent: Color, val onAccent: Color, val accentSoft: Color, val onAccentSoft: Color, val background: Color, val surface: Color, val surfaceRaised: Color, val surfaceSunken: Color, val scrim: Color, val hairline: Color, val outline: Color, val focusRing: Color, val textPrimary: Color, val textSecondary: Color, val textTertiary: Color, val textDisabled: Color, val error: Color, val errorSoft: Color, val success: Color, val successSoft: Color, val warning: Color, val warningSoft: Color, val highlight: Color, val shadow: Color, val skeleton: Color, val skeletonShine: Color)(source)

The picker's color roles.

A deliberately small set of semantic roles — surfaces, lines, content and status — that every component derives its colors from, rather than one property per pixel. Retheming is therefore a matter of meaning ("my cards are this white, my accent is this teal") instead of hunting for the one property out of forty that paints a particular border.

Build one from a preset in CountryPickerStyles and adjust with copy, or construct it outright for a fully custom palette.

Surfaces

The picker composes four surface levels so depth reads without relying on shadows alone: background is the canvas of a sheet or dialog; surface is a card, a field or a grouped list sitting on it; surfaceRaised floats above that (the multi-select bar, quick-pick tiles); and surfaceSunken is recessed into it (the search field, the segment track behind region filters, the tile behind a flag).

Constructors

Link copied to clipboard
constructor(accent: Color, onAccent: Color, accentSoft: Color, onAccentSoft: Color, background: Color, surface: Color, surfaceRaised: Color, surfaceSunken: Color, scrim: Color, hairline: Color, outline: Color, focusRing: Color, textPrimary: Color, textSecondary: Color, textTertiary: Color, textDisabled: Color, error: Color, errorSoft: Color, success: Color, successSoft: Color, warning: Color, warningSoft: Color, highlight: Color, shadow: Color, skeleton: Color, skeletonShine: Color)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The brand color: focus, selection, primary actions.

Link copied to clipboard

A quiet tint of the accent, for selected rows and active filters.

Link copied to clipboard

Sheet and dialog canvas.

Link copied to clipboard

Error borders, text and icons.

Link copied to clipboard

Error-tinted containers.

Link copied to clipboard

The soft glow drawn around a focused or open field.

Link copied to clipboard

Dividers and resting card borders.

Link copied to clipboard

Background behind the part of a country name that matched a search.

Link copied to clipboard

True when this palette is a dark one, judged from its background.

Link copied to clipboard

Content drawn on accent.

Link copied to clipboard

Content drawn on accentSoft.

Link copied to clipboard

Field borders at rest — a step stronger than hairline.

Link copied to clipboard

Dim layer behind a sheet or dialog.

Link copied to clipboard

Tint of every shadow layer.

Link copied to clipboard

Loading-placeholder fill.

Link copied to clipboard

The moving highlight swept across skeleton.

Link copied to clipboard

Valid and verified states.

Link copied to clipboard

Success-tinted containers, such as the number-type badge.

Link copied to clipboard

Cards, fields and grouped lists.

Link copied to clipboard

Elements floating above cards.

Link copied to clipboard

Elements recessed into cards.

Link copied to clipboard

Disabled content. Still legible: a field nobody can read is worse than one nobody can edit.

Link copied to clipboard

Country names and field values.

Link copied to clipboard

Labels, subtitles and metadata.

Link copied to clipboard

Placeholders, ghost digits and the index rail.

Link copied to clipboard

Limits and soft warnings, such as the maximum-selection notice.

Link copied to clipboard

Warning-tinted containers.