Varoius tools and helpers for working with HTML Canvases.
npm install canvas-drawing-toolscreateCanvas(width, height)
getCanvasContect(canvasOrId)
drawToCanvas(width, height, drawCallback)
rotateContext(context, angle)
createLinearGradient(context, x0, y0, x1, y1, colorStops)
colorStops is an array of objects { color: string, offset: number }.
createRadialGradient(context, x, y, r0, r1, colrStops)
getColorValues(color)
rgbToHsl(red, green, blue)
rgbToHsb(red, green, blue)
hsbToRgb(hue, saturation, brightness)
hexToRgb(color)