Documentation
    Preparing search index...

    Interface SolidPaint

    A flat colour (§58 "solid color") — the paint tier this release ships.

    const blue: SolidPaint = { kind: "solid", color: [0.27, 0.4, 1, 1] };
    

    The colour is linear-light straight RGBA, §60a's working space and the same tuple every material carries; @fourjs/math's srgbToLinearRGBA(parseColor(…)) is the one-line path from §50's "#4466ff" (§101 pins tuples as the shipped spelling — see R-15).

    interface SolidPaint {
        color: ColorRGBA;
        kind: "solid";
        opacity?: number;
    }
    Index
    color: ColorRGBA

    Straight, linear-light RGBA (§60a). Copied on assignment.

    kind: "solid"

    Discriminant. See Paint for why a one-member union has one.

    opacity?: number

    A second, independent multiplier on the colour's alpha (§50 "fill opacity and stroke opacity"); finite, in 0…1, defaults to 1.

    §50 lists opacity as a requirement beside fill and stroke rather than inside them, and SVG and Canvas both carry the pair for the same reason: fill-opacity is the knob an author animates without touching the colour they authored. The drawn alpha is color[3] × opacity.