Documentation ¶
Overview ¶
Package sketch provides utilities and color palettes for plotting graphs and images
Index ¶
- Variables
- func FilledRectangle(img *image.RGBA, xOne, yOne, xTwo, yTwo int, col color.Color)
- func HLine(img *image.RGBA, xStart, xEnd, y int, col color.Color)
- func Rectangle(img *image.RGBA, xOne, yOne, xTwo, yTwo int, col color.Color)
- func Text(img *image.RGBA, label string, xStart, yStart int)
- func VLine(img *image.RGBA, x, yStart, yEnd int, col color.Color)
Constants ¶
This section is empty.
Variables ¶
var KellyPalette = color.Palette{ color.RGBA{0xF2, 0xF3, 0xF4, 0xff}, color.RGBA{0x22, 0x22, 0x22, 0xff}, color.RGBA{0xF3, 0xC3, 0x00, 0xff}, color.RGBA{0x87, 0x56, 0x92, 0xff}, color.RGBA{0xF3, 0x84, 0x00, 0xff}, color.RGBA{0xA1, 0xCA, 0xF1, 0xff}, color.RGBA{0xBE, 0x00, 0x32, 0xff}, color.RGBA{0xC2, 0xB2, 0x80, 0xff}, color.RGBA{0x84, 0x84, 0x82, 0xff}, color.RGBA{0x00, 0x88, 0x56, 0xff}, color.RGBA{0xE6, 0x8F, 0xAC, 0xff}, color.RGBA{0x00, 0x67, 0xA5, 0xff}, color.RGBA{0xF9, 0x93, 0x79, 0xff}, color.RGBA{0x60, 0x4E, 0x97, 0xff}, color.RGBA{0xF6, 0xA6, 0x00, 0xff}, color.RGBA{0xB3, 0x44, 0x6C, 0xff}, color.RGBA{0xDC, 0xD3, 0x00, 0xff}, color.RGBA{0x88, 0x2D, 0x17, 0xff}, color.RGBA{0x8D, 0xB6, 0x00, 0xff}, color.RGBA{0x65, 0x45, 0x22, 0xff}, color.RGBA{0xE2, 0x58, 0x22, 0xff}, color.RGBA{0x2B, 0x3D, 0x26, 0xff}, }
KellyPalette contains a set of high-contrast colors from: K. Kelly (1965): Twenty-two colors of maximum contrast. Color Eng., 3(6)
var TrubetskoyPalette = color.Palette{ color.RGBA{0xe6, 0x19, 0x4b, 0xff}, color.RGBA{0x3c, 0xb4, 0x4b, 0xff}, color.RGBA{0xff, 0xe1, 0x19, 0xff}, color.RGBA{0x00, 0x82, 0xc8, 0xff}, color.RGBA{0xf5, 0x82, 0x31, 0xff}, color.RGBA{0x91, 0x1e, 0xb4, 0xff}, color.RGBA{0x46, 0xf0, 0xf0, 0xff}, color.RGBA{0xf0, 0x32, 0xe6, 0xff}, color.RGBA{0xd2, 0xf5, 0x3c, 0xff}, color.RGBA{0xfa, 0xbe, 0xbe, 0xff}, color.RGBA{0x00, 0x80, 0x80, 0xff}, color.RGBA{0xe6, 0xbe, 0xbe, 0xff}, color.RGBA{0xaa, 0x6e, 0x28, 0xff}, color.RGBA{0xff, 0xfa, 0xc8, 0xff}, color.RGBA{0x80, 0x00, 0x00, 0xff}, color.RGBA{0xaa, 0xff, 0xcf, 0xff}, color.RGBA{0x80, 0x80, 0x00, 0xff}, color.RGBA{0xff, 0xd8, 0xb1, 0xff}, color.RGBA{0x00, 0x00, 0x80, 0xff}, color.RGBA{0x80, 0x80, 0x80, 0xff}, color.RGBA{0xff, 0xff, 0xff, 0xff}, color.RGBA{0x00, 0x00, 0x00, 0xff}, }
TrubetskoyPalette contains a set of high-contrast colors from: https://sashat.me/2017/01/11/list-of-20-simple-distinct-colors
Functions ¶
func FilledRectangle ¶
FilledRectangle draws a filled rectangle on the given image with the specified coordinates and color.
func HLine ¶
HLine draws a horizontal line on the given image between the xStart and xEnd coordinates at the y coordinate with the specified color.
func Rectangle ¶
Rectangle draws a rectangle on the given image with the specified coordinates and color.
Types ¶
This section is empty.