@skchr/color
    Preparing search index...

    Type Alias TokenOptions

    Overrides to customize the parsing and output behaviour.

    type TokenOptions = {
        kind?: "num" | "arr" | "obj" | "str";
        normalizeRgb?: boolean;
        numType?: "expo" | "hex" | "oct" | "bin";
        omitAlpha?: boolean;
        omitMode?: boolean;
        srcMode?: Colorspaces;
        targetMode?: Colorspaces;
    }
    Index

    Properties

    kind?: "num" | "arr" | "obj" | "str"

    The type of color token to return. Default is 'str'.

    normalizeRgb?: boolean

    If true and the passed in color token is an array or plain object and in the srcMode of 'rgb' or 'lrgb', it will have all channels normalized back to [0,1] range if any of the channel values is beyond 1.

    This can help the parser to recognize RGB colors in the [0,255] range which Culori doesn't handle.

    Default is true.

    numType?: "expo" | "hex" | "oct" | "bin"

    The type of number to return. Only valid if kind is set to 'number'. Default is 'literal'

    omitAlpha?: boolean

    If the kind is set to 'arr' it will remove the alpha channel value from color tuple. Default is false.

    omitMode?: boolean

    If the kind is set to 'arr' it will remove the mode string from color tuple. Default is false.

    srcMode?: Colorspaces

    The mode in which the channel values are valid in. It is used for color arrays if they have the colorspace string omitted. Default is 'rgb'.

    targetMode?: Colorspaces

    The colorspace in which to return the color object or array in. Default is 'lch'.