AppendHex#
func (v ColorPickerValue) AppendHex(dst []byte, alpha bool) []byteAppendHex appends canonical #RRGGBB (or #RRGGBBAA) to caller-owned storage. Format only when a value changes; painting consumes the caller's input text.
type ColorPickerValue struct {
Hue, Saturation, Brightness, Alpha float32
}ColorPickerValue is caller-owned HSV editing state. Keeping HSV rather than rebuilding it from RGB on every paint preserves the hue at gray and black.
AppendHex#func (v ColorPickerValue) AppendHex(dst []byte, alpha bool) []byteAppendHex appends canonical #RRGGBB (or #RRGGBBAA) to caller-owned storage. Format only when a value changes; painting consumes the caller's input text.
Color#func (v ColorPickerValue) Color() ui.ColorColor converts the selected HSV value to straight RGBA without allocating.
WithColor#func (v ColorPickerValue) WithColor(c ui.Color) ColorPickerValueWithColor loads an RGB edit, retaining hue for achromatic colors and the previous saturation at black so a subsequent brightness change is useful.