PreferenceColor

fun PreferenceScope.PreferenceColor(value: MutableState<Color>, alphaSupported: Boolean = true, directEditSupported: Boolean = false, title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceColorDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), dialog: @Composable (state: DialogState) -> Unit = { dialogState -> PreferenceColorDefaults.dialog(dialogState, value.value, { value.value = it }, alphaSupported, directEditSupported, title, icon) })

A color preference item - this item provides a color dialog to change this preference

 

Basic Parameters: all params not described here are derived from com.michaelflisar.composepreferences.core.composables.BasePreference, check it out for more details

Parameters

value

the MutableState of this item

alphaSupported

if true, this preference does support alpha values (ARGB) otherwise it doesn't (RGB only)

directEditSupported

if true, this preference does allow direct editing of rgba values (in the custom color page)


fun PreferenceScope.PreferenceColor(value: Color, onValueChange: (value: Color) -> Unit, alphaSupported: Boolean = true, directEditSupported: Boolean = false, title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceColorDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), dialog: @Composable (state: DialogState) -> Unit = { dialogState -> PreferenceColorDefaults.dialog(dialogState, value, onValueChange, alphaSupported, directEditSupported,title, icon) })

A color preference item - this item provides a color dialog to change this preference

 

Basic Parameters: all params not described here are derived from com.michaelflisar.composepreferences.core.composables.BasePreference, check it out for more details

Parameters

value

the color value of this item

onValueChange

the value changed callback of this item

alphaSupported

if true, this preference does support alpha values (ARGB) otherwise it doesn't (RGB only)

directEditSupported

if true, this preference does allow direct editing of rgba values (in the custom color page)