Color returns the ith default color, wrapping if i is less than zero or greater than the max number of colors in the DefaultColors slice.
(i int)
| 45 | // if i is less than zero or greater than the max |
| 46 | // number of colors in the DefaultColors slice. |
| 47 | func Color(i int) color.Color { |
| 48 | n := len(DefaultColors) |
| 49 | if i < 0 { |
| 50 | return DefaultColors[i%n+n] |
| 51 | } |
| 52 | return DefaultColors[i%n] |
| 53 | } |
| 54 | |
| 55 | // DefaultGlyphShapes is a set of GlyphDrawers used by |
| 56 | // the Shape function. |
no outgoing calls
no test coverage detected