Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
FormsApple

Color picker

Edit controlled native colors with validated text, channels and optional alpha.

Public APILumenColorPickerApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple Vision · visionOS 1+

Native example

Use Color picker

Use bounded hex or rgba values; unsupported CSS strings remain visible as invalid drafts. Hosts own the value and optional named palette. Enable alpha explicitly; latent hue survives black or gray channel edits.

Color picker rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenColorPicker("Accent color", value: $color)

Reference

Public API

The primary shared and platform-specific options exposed by LumenColorPicker.

APIValues or typeDefaultDescription
value / onValueChangeControlled color text / native binding or callbackRequiredRequests canonical color changes without replacing invalid host input.
allowAlpha / palette / labelsBoolean / named swatches / localized labelsfalse / empty / EnglishControls opacity support and accessible channel names.

Native behavior

Design and accessibility

When to use it

Use bounded hex or rgba values; unsupported CSS strings remain visible as invalid drafts. Hosts own the value and optional named palette. Enable alpha explicitly; latent hue survives black or gray channel edits.

Accessibility

Localized channel and palette names, validation feedback and native disabled/read-only controls.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package