gradient-maker
get liner gradient in CSS, Canvas2d and fillStyle
of context2d.
Example
Usage
As a module
; const angle = '30deg';const colorStops = offset: 00 color: 'black' offset: 02 color: '#090979' offset: 06 color: 'rgba( 189, 4, 149, 1)' offset: 10 color: 'rgba( 0, 212, 255, 0.8)' ; const gradMaker = angle colorStops ;
then,
const canvas = gradMaker; // reutrns 128 x 64 canvas elementconst fillStyle = gradMaker; // reutrns fill style onlyconst cssBackground = gradMaker; // reutrns css liner-gradient