grapick icon indicating copy to clipboard operation
grapick copied to clipboard

suggestion: be able to set the initial layout as a string

Open frumbert opened this issue 3 years ago • 0 comments

I'd like to be able to set the initial value as the css string, rather than having to add handles via handler.setColor

instance.setColorValue('repeating-linear-gradient(to bottom, #085078 0%, #85D8CE 50%, $ffcc33 60%)')

and this would set the initial select box values and create handles at each of the stops.

it would be good to be able to interpret a standard colour value as a default linear gradient

instance.setColorValue('rgb(8, 80, 120)')

would be interpreted as a gradient with identical stops, such as

linear-gradient(to right, rgb(8, 80, 120) 0%, rgb(8, 80, 120) 100%)

frumbert avatar Apr 15 '21 02:04 frumbert