Skip to content

Implement sweep (conic) gradients #3

@Lorp

Description

@Lorp

Sweep gradients are not representable directly in SVG. However sweep gradients are available (called conic gradients) in HTML canvas. So if/when canvas output is added to Samsa, it can be implemented. CanvasRenderingContext2D: createConicGradient() method

Sweep gradients are also available in Skia. Because of that, they are available in CanvasKit - Skia + WebAssembly. This was used by @underware to polyfill COLRv1 in Safari for the Plakato Moiré demo.

Sweep ("conic") gradients are also available in CSS:

background-image: conic-gradient(red, orange, yellow, green, blue);

… and this CSS Tricks article talks about including regular DIVs in SVG as <foreignObject>:
My Struggle to Use and Animate a Conic Gradient in SVG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions