SheetXL - v0.3.20
    Preparing search index...

    Interface IGradient

    A gradient fill, where colors transition across the area.

    interface IGradient {
        getAngle(): number;
        getFillTo(): Rectangle;
        getGradientType(): GradientType;
        getStops(): IGradientStop[];
        getType(): "gradient";
        toCSS(darkMode?: boolean, bounds?: Bounds): Properties;
        toJSON(): GradientJSON;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • The angle of the gradient in degrees if gradient type is linear.

      Returns number

    • Returns the fill as a set of css string that are suitable for css.

      Parameters

      • OptionaldarkMode: boolean
      • Optionalbounds: Bounds

      Returns Properties

      Not all fill styles will offer an exact css equivalent. Additionally due to the nature of css having different properties for the same logic value (for example color, backgroundColor)

    • Returns GradientJSON