MCPcopy Create free account
hub / github.com/andlabs/ui / Color

Method Color

colorbutton.go:35–40  ·  view source on GitHub ↗

Color returns the color currently selected in the ColorButton. Colors are not alpha-premultiplied. TODO rename b or bl

()

Source from the content-addressed store, hash-verified

33// Colors are not alpha-premultiplied.
34// TODO rename b or bl
35func (b *ColorButton) Color() (r, g, bl, a float64) {
36 c := C.pkguiAllocColorDoubles()
37 defer C.pkguiFreeColorDoubles(c)
38 C.uiColorButtonColor(b.b, c.r, c.g, c.b, c.a)
39 return float64(*(c.r)), float64(*(c.g)), float64(*(c.b)), float64(*(c.a))
40}
41
42// SetColor sets the currently selected color in the ColorButton.
43// Colors are not alpha-premultiplied.

Callers 1

DrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected