zenity/color.go

23 lines
515 B
Go
Raw Normal View History

2020-01-23 06:44:28 -05:00
package zenity
import "image/color"
// SelectColor displays the color selection dialog.
//
// Returns nil on cancel.
//
// Valid options: Title, Color, ShowPalette.
func SelectColor(options ...Option) (color.Color, error) {
return selectColor(options...)
}
// Color returns an Option to set the color.
func Color(c color.Color) Option {
return func(o *options) { o.color = c }
}
// ShowPalette returns an Option to show the palette.
func ShowPalette() Option {
return func(o *options) { o.palette = true }
}