linearGradient
and radialGradient
to do the same, thanks to a new property named linkTo
. But the goodies do not stop there, while linking you can add more stops to the new gradient or even override a previous stop at the same offset.
The image shows 5 vertical-oriented gradients, the first one serves as the basis for the next 3, the second gradient links to the first and adds a new stop at
offset=0.33
, the third one links to the second and adds a new stop at offset=0.66
, the fourth one links to the third and overrides the stop at offset=0.66
. The last gradient shows another new feature available in color()
: the ability to decode hex color literals.Happy Groovy New Year!