-
Notifications
You must be signed in to change notification settings - Fork 2
/
colors.go
48 lines (46 loc) · 1.45 KB
/
colors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package gw2api
// Color is a game item color
type Color struct {
ID int `json:"id"`
Name string `json:"name"`
BaseRGB []int `json:"base_rgb"`
Cloth struct {
Brightness int `json:"brightness"`
Contrast float64 `json:"contrast"`
Hue int `json:"hue"`
Saturation float64 `json:"saturation"`
Lightness float64 `json:"lightness"`
RGB []int `json:"rgb"`
} `json:"cloth"`
Leather struct {
Brightness int `json:"brightness"`
Contrast float64 `json:"contrast"`
Hue int `json:"hue"`
Saturation float64 `json:"saturation"`
Lightness float64 `json:"lightness"`
RGB []int `json:"rgb"`
} `json:"leather"`
Metal struct {
Brightness int `json:"brightness"`
Contrast float64 `json:"contrast"`
Hue int `json:"hue"`
Saturation float64 `json:"saturation"`
Lightness float64 `json:"lightness"`
RGB []int `json:"rgb"`
} `json:"metal"`
Fur struct {
Brightness int `json:"brightness"`
Contrast float64 `json:"contrast"`
Hue int `json:"hue"`
Saturation float64 `json:"saturation"`
Lightness float64 `json:"lightness"`
RGB []int `json:"rgb"`
} `json:"fur"`
Item int `json:"item"`
Categories []string `json:"categories"`
}
// Colors returns the colors with the given ids
func (s *Session) Colors(ids ...int) (resp []*Color, err error) {
err = s.getWithLang(concatStrings("/v2/colors", genArgs(ids...)), &resp)
return
}