MCPcopy Create free account
hub / github.com/fogleman/primitive / MakeColor

Function MakeColor

primitive/color.go:13–16  ·  view source on GitHub ↗
(c color.Color)

Source from the content-addressed store, hash-verified

11}
12
13func MakeColor(c color.Color) Color {
14 r, g, b, a := c.RGBA()
15 return Color{int(r / 257), int(g / 257), int(b / 257), int(a / 257)}
16}
17
18func MakeHexColor(x string) Color {
19 x = strings.Trim(x, "#")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…