modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface ColorData

    A SpreadsheetML colour (CT_Color): an ARGB value, a theme slot, a legacy palette index or the automatic colour, with an optional tint. Every attribute is optional and absent ones are omitted.

    Properties named colorSpec, fgColorSpec, bgColorSpec and colorSpecs carry the full colour next to the legacy rgb-only string property (color, fgColor, tabColor, ...). On write the spec wins only while spec.rgb equals that string (an empty string counts as absent); otherwise the string is written as plain rgb. So to change a colour, change the string and drop or update the spec.

    interface ColorData {
        auto?: boolean;
        indexed?: number;
        rgb?: string;
        theme?: number;
        tint?: number;
    }
    Index
    auto?: boolean

    The automatic (system) colour.

    indexed?: number

    Index into the legacy indexed palette (64 is the system foreground, 65 the system background).

    rgb?: string

    ARGB hex, e.g. 'FF4472C4'.

    theme?: number

    Zero-based index into the theme's colour scheme.

    tint?: number

    Lightens (positive) or darkens (negative) the colour, from -1 to 1.