SheetXL - v0.3.20
    Preparing search index...

    Capabilities for working with colors.

    Advanced color customization and compatibility with CSS and Office color schemes.

    Key features include:

    • Accessing a collection of built-in colors (Named, Scheme, Index).
    • Creating customized colors with color adjustments.
    • Defining and and converting between different color models (RGB, HEX, HSL).

    IColor

    Implements

    Index

    Constructors

    Accessors

    • get "[toStringTag]"(): string

      Returns string

    • get isIColor(): true

      For runtime type checking.

      Returns true

    Methods

    • Returns a new color that is derived from this color with the adjustments applied.

      Parameters

      Returns IColor

    • The base value for the color before adjustments.

      Returns string

    • Returns true if the other color will resolve to the same rgb values as this color.

      Parameters

      • other: any

        The other color to compare.

      Returns boolean

    • Returns the color as either 'black or white' depending on the luminance.

      Parameters

      • darkMode: boolean = false
      • threshold: number = 157

        The threshold to determine if the color is dark or light.

      Returns IColor

    • Return a string usable with CSS color properties.

      Parameters

      • darkMode: boolean = false

        If true dark colors will be used.

      • alpha: boolean = true

        If true alpha will be applied.

      Returns string

    • Return a HEX with adjustments applied.

      Parameters

      • darkMode: boolean = false

      Returns HEX

    • Return as HSLA with adjustments applied.

      Parameters

      • darkMode: boolean = false

      Returns HSLA

    • Return as RGBA with adjustments applied.

      Parameters

      • darkMode: boolean = false

      Returns RGBA

    • Return the color as a string.

      Returns string

    • Returns the default color scheme lookup that Colors will use if none is provided.

      Returns SchemeLookup