17 lines
289 B
Go
17 lines
289 B
Go
|
package structs
|
||
|
|
||
|
type Coordinates struct {
|
||
|
X int `form:"x" json:"x"`
|
||
|
Y int `form:"y" json:"y"`
|
||
|
}
|
||
|
|
||
|
type Color struct {
|
||
|
R uint32 `form:"r" json:"r"`
|
||
|
G uint32 `form:"g" json:"g"`
|
||
|
B uint32 `form:"b" json:"b"`
|
||
|
}
|
||
|
|
||
|
func (c *Color) RGBA() (r, g, b, a uint32) {
|
||
|
return c.R, c.G, c.B, 65535
|
||
|
}
|