Selection and input

ColorPicker

The system colour picker.

iOSSwiftUI ColorPickerAndroid—Renders in a Screen or an Island
ColorPicker on iOS
iOSSwiftUI ColorPicker
Not on AndroidSee the platform notes below.
Android—

Import

ts
import {ColorPicker} from '@hzblj/kara-ui'

Props

The system colour picker. iOS only — Compose ships no equivalent, so on Android this renders nothing and says so in dev. Branch on Platform.OS if the screen needs a fallback.

PropTypeDefaultDescription
value*string | null—

#RRGGBB or #RRGGBBAA.

labelstring—

Text beside the colour well.

onValueChange(color: string) => void—

Called with the colour the user picks.

supportsOpacitybooleaniOS false

Lets the user pick an opacity as well. Off by default.

testIDstring—

Test identifier, forwarded to the native view.

value*
string | null

#RRGGBB or #RRGGBBAA.

label
string

Text beside the colour well.

onValueChange
(color: string) => void

Called with the colour the user picks.

supportsOpacityiOS false
boolean

Lets the user pick an opacity as well. Off by default.

testID
string

Test identifier, forwarded to the native view.

Platform notes

  • iOS only — Compose has no colour picker, and on Android it renders nothing (with a dev warning).