i2 Notebook SDK
Search results for

    Show/hide table of contents

    Home > @i2analyze/notebook-sdk > visual > ColorRangeConfig

    visual.ColorRangeConfig type

    A configuration for creating a color range, specified as a mapping of brush indices to CSS color strings.

    Signature:

    type ColorRangeConfig = Record<BrushIndex, string>;
    

    References: BrushIndex

    Introduced: version 1.9

    Remarks

    The keys are brush indices and the values are CSS color strings. You must provide at least one entry.

    For a discrete color range, provide a color for every index you intend to use. For example, { 0: '#FF0000', 1: '#00FF00', 2: '#0000FF' } maps index 0 to red, 1 to green, and 2 to blue.

    For a continuous (gradient) color range, provide colors only at key indices. For example, { 0: '#FF0000', 100: '#0000FF' } maps index 0 to red and index 100 to blue; intermediate indices are interpolated linearly between the two colors.

    In this article
    Back to top © N. Harris Computer Corporation