This is the documentation of version 0.60.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Variable cssColorsConst

    cssColors: (cssText: string, options?: MapThemeExtractionOptions) => string[]

    The colours a stylesheet paints with, most used first, as hex strings: var() references resolved, fills weighted over borders and shadows, translucent colours and a colour's shades left out, and at most two greys while colourful ones remain. Feed the result to deriveMapColors; deriveMapColorsFromCss does both.

    Rules for one colour scheme (prefers-color-scheme, a .dark or .light class, a data-*="dark" attribute) are read only with that mode, and then override the defaults; auto reads neither. A var() resolves against its own rule or the page root, not a custom property set on another selector.

    Type Declaration