adding some color helpers
This commit is contained in:
parent
d88ba0ead3
commit
f986c3c075
|
@ -103,6 +103,9 @@ var (
|
||||||
ColorAlternateYellow = drawing.Color{R: 240, G: 174, B: 90, A: 255}
|
ColorAlternateYellow = drawing.Color{R: 240, G: 174, B: 90, A: 255}
|
||||||
// ColorAlternateLightGray is a alternate theme color.
|
// ColorAlternateLightGray is a alternate theme color.
|
||||||
ColorAlternateLightGray = drawing.Color{R: 187, G: 190, B: 191, A: 255}
|
ColorAlternateLightGray = drawing.Color{R: 187, G: 190, B: 191, A: 255}
|
||||||
|
|
||||||
|
// ColorTransparent is a transparent (alpha zero) color.
|
||||||
|
ColorTransparent = drawing.Color{R: 0, G: 0, B: 0, A: 0}
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -171,6 +174,11 @@ var (
|
||||||
DashArrayDashesLarge = []int{10, 10}
|
DashArrayDashesLarge = []int{10, 10}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// NewColor returns a new color.
|
||||||
|
func NewColor(r, g, b, a uint8) drawing.Color {
|
||||||
|
return drawing.Color{R: r, G: g, B: b, A: a}
|
||||||
|
}
|
||||||
|
|
||||||
// GetDefaultColor returns a color from the default list by index.
|
// GetDefaultColor returns a color from the default list by index.
|
||||||
// NOTE: the index will wrap around (using a modulo).
|
// NOTE: the index will wrap around (using a modulo).
|
||||||
func GetDefaultColor(index int) drawing.Color {
|
func GetDefaultColor(index int) drawing.Color {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user