Hex Core JS
    Preparing search index...

    Function useColors

    • Provides a callback allowing to simple indexing into a named color scheme. The callback accepts an index which will wrap around the length of the color scheme. e.g. for a color scheme with 10 colors, callback(16) === callback(6).

      Parameters

      • colorSchemeName:
            | "nivo"
            | "category10"
            | "accent"
            | "dark2"
            | "paired"
            | "pastel1"
            | "pastel2"
            | "set1"
            | "set2"
            | "set3"
            | "tableau10"

        The name of the color scheme to use.

      Returns (index: number) => string