MCPcopy Create free account
hub / github.com/OpenSN-Library/OpenSN-Library / isInPalette

Function isInPalette

tools/PacketCapture/main.go:44–52  ·  view source on GitHub ↗
(p color.Palette, c color.Color)

Source from the content-addressed store, hash-verified

42}
43
44func isInPalette(p color.Palette, c color.Color) int {
45 ret := -1
46 for i, v := range p {
47 if v == c {
48 return i
49 }
50 }
51 return ret
52}
53
54func getPalette(m image.Image) color.Palette {
55 p := color.Palette{color.RGBA{0x00, 0x00, 0x00, 0x00}}

Callers 1

getPaletteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected