RGBAFromHex assumes the value is correct and ignores alpha
(hex string)
| 77 | |
| 78 | // RGBAFromHex assumes the value is correct and ignores alpha |
| 79 | func RGBAFromHex(hex string) (*gdk.RGBA, error) { |
| 80 | rgba := gdk.NewRGBA(0, 0, 0, 255) |
| 81 | ok := rgba.Parse(hex) |
| 82 | if !ok { |
| 83 | return nil, fmt.Errorf("invalid hex string") |
| 84 | } |
| 85 | |
| 86 | return &rgba, nil |
| 87 | } |
| 88 | |
| 89 | func SetShowPresets(value bool) { |
| 90 | UserPrefs.ShowPresets = value |
no outgoing calls
no test coverage detected