Interface SerializeOptions

interface SerializeOptions {
    alpha?: boolean | "<number>" | "<percentage>" | {
        include?: boolean;
        type?: "<number>" | "<percentage>";
    };
    commas?: boolean;
    coords?: string[];
    format?: string | SpaceFormat;
    inGamut?: boolean;
    precision?: number;
}

Properties

alpha?: boolean | "<number>" | "<percentage>" | {
    include?: boolean;
    type?: "<number>" | "<percentage>";
}

Alpha format

Type declaration

  • Optional include?: boolean
  • Optional type?: "<number>" | "<percentage>"
commas?: boolean

Force commas as a separator

Default

false
coords?: string[]

Coordinate format to override the default

format?: string | SpaceFormat

Output format id. Defaults to the parsed format if available (and can serialize), or the color space default otherwise

Default

"default"
inGamut?: boolean

Adjust coordinates to fit in gamut first

Default

false
precision?: number

Significant digits