mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 22:33:08 +00:00
A gradient swatch saved as CSS wrote only its own stops, so CSS put an off-center midpoint at the center and mixed a Perceptual or hue gradient in a straight line between its stops. CSS mixes hex colors evenly in sRGB between two stops (https://www.w3.org/TR/css-color-4/#interpolation-space), so the export now writes the midpoints and the curve as stops of their own, each with its color and opacity, also on repeated, reflected and mirrored conic swatches. A gradient that would need more than MAX_SPREAD_STOPS stops that way is written with its own stops.