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
if true, this preference does support alpha values (ARGB) otherwise it doesn't (RGB only)
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
the color value of this item
the value changed callback of this item
if true, this preference does support alpha values (ARGB) otherwise it doesn't (RGB only)
if true, this preference does allow direct editing of rgba values (in the custom color page)