place/api/structs/structs.go

17 lines
289 B
Go
Raw Normal View History

2024-06-13 11:25:18 +00:00
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
}