Skip to content

Styling#

Apply styles, palettes, and gradients.

Sections defining various methods for defining and applying styles, such as color palettes and gradients.

Color#

Classes and methods for visualization color manipulation.

Classes and methods related to defining and manipulating colors within visualizations.

Single #

Single(color: str | Palette)

Class for creating a single color instance.

Create a class representing a single color within a palette for a Timeseries widget.

Constructor for Single.

Parameters:

Name Type Description Default
color str | Palette

a color from Palette or a hex color string (including transparency alpha).

required

DiscreteMap #

DiscreteMap(*items: DiscreteMapItem)

Map values to specific colors.

Construct a specification for creating a discrete map of colors. The DiscreteMap class allows users to define a set of DiscreteMapItem objects, each representing a mapping between a specific value or category and a corresponding color.

Constructor for DiscreteMap.

Parameters:

Name Type Description Default
items DiscreteMapItem

list of values, intervals composing the color map (DiscreteMapIntervalItem or DiscreteMapValueItem)

()

DiscreteMapValueItem #

DiscreteMapValueItem(
    value: int | float, color: Palette | Single | str
)

Map single values to colors.

Create a specification to represent a discrete mapping between a single value and a specific color within a discrete color map.

Constructor for DiscreteMapValueItem.

Parameters:

Name Type Description Default
value int | float

value for which the color will be applied.

required
color Palette | Single | str

color applied to interval (Palette) or color itself (Single).

required

DiscreteMapIntervalItem #

DiscreteMapIntervalItem(
    *,
    min_value: int | float,
    max_value: int | float,
    color: Palette | Single | str,
    exclude_min: bool = False,
    exclude_max: bool = False,
)

Map value intervals to colors.

Define specifications for creating a color discrete map item, enabling association of a color with an interval of numerical values.

Constructor for DiscreteMapIntervalItem.

Parameters:

Name Type Description Default
min_value int | float

start of the interval.

required
max_value int | float

end of the interval.

required
color Palette | Single | str

color applied to interval (Palette) or color itself (Single).

required
exclude_min bool

whether to make min exclusive. (Default: False)

False
exclude_max bool

whether to make max exclusive. (Default: False)

False

Divergent #

Divergent(
    mid_value: int,
    mid_color: Palette | str,
    above_color: ColorSpec,
    below_color: ColorSpec,
)

Creates a class for a Color Divergent.

Constructor for ColorDivergent.

Parameters:

Name Type Description Default
mid_value int

intermediate value for comparison.

required
mid_color Palette | str

color for intermediate value.

required
above_color ColorSpec

color spec for value above mid_value.

required
below_color ColorSpec

color spec for value below mid_value.

required

Gradient #

Gradient(*items: GradientItem, steps: int = 10)

Define gradient for smooth transitions between colors.

Create a specification for defining a color gradient, allowing for smooth transitions between colors. The Gradient class facilitates the creation of a continuous range of colors by specifying a set of GradientItem objects representing key points along the gradient.

Constructor for Gradient.

Parameters:

Name Type Description Default
items GradientItem

map between color and intervals.

()
steps int

number of intermediate colors between gradient items. Defaults to 10.

10

GradientItem #

GradientItem(
    *, value: int | float, color: Palette | Single | str
)

Represents value and corresponding color in a gradient.

Item within a color gradient, representing a value and its corresponding color. For instance suppose that a gradient has 3 colors, the Gradient class will have 3 GradientItem(s).

Constructor for GradientItem.

Parameters:

Name Type Description Default
value int | float

initial value of interval with color.

required
color Palette | Single | str

color applied to interval (Palette) or color itself (Single).

required

PositiveNegativeDiscreteMap #

PositiveNegativeDiscreteMap()

Template for discrete map with positive/negative numbers.

Template for creating a discrete map specifically designed for positive and negative numbers.

Constructor for PositiveNegativeDiscreteMap.

Palette#

qualitative_palette #

qualitative_palette(*, index: int) -> Palette

Returns color of qualitative palette given index.

Parameters:

Name Type Description Default
index int

index of qualitative palette (e.g. index of series of a timeseries chart)

required

Returns:

Name Type Description
Palette Palette

returns corresponding color of qualitative palette

sequential_palette #

sequential_palette(
    *,
    index: int,
    n_series: int | None = None,
    palette: SequentialPaletteType = SequentialPalette,
) -> Palette

Returns color of sequential palette given index.

Parameters:

Name Type Description Default
index int

index of sequential palette (e.g. index of series of a timeseries chart)

required
n_series int | None

total number of series used for sequential palette. Determines sub-versions of sequential palette to improve contrast. Defaults to None, i.e. uses entire palette.

None
palette SequentialPaletteType

enum of sequential palettes to use.

SequentialPalette

Returns:

Name Type Description
Palette Palette

returns corresponding color of sequential palette

Palette #

Predefined color palettes.

Collection of predefined color palettes for various purposes.

Attributes:

Name Type Description
MINT_GREEN str

Mint green color.

SUNSET_ORANGE str

Sunset orange color.

BUBBLEGUM_PINK str

Bubblegum pink color.

GRASS_GREEN str

Grass green color.

LAVENDER_PURPLE str

Lavender purple color.

ALMOND_BROWN str

Almond brown color.

SKY_BLUE str

Sky blue color.

CHILI_RED str

Chili red color.

FOREST_GREEN str

Forest green color.

PEACOCK_GREEN str

Peacock green color.

LAGOON_GREEN str

Lagoon green color.

AQUA_GREEN str

Aqua green color.

FROST_GREEN str

Frost green color.

RUBI_RED str

Rubi red color.

SALMON_RED str

Salmon red color.

COCONUT_GREY str

Coconut grey color.

BABY_BLUE str

Baby blue color.

SEA_BLUE str

Sea blue color.

CEMENT_GREY str

Cement grey color.

COAL_GREY str

Coal grey color.

CROW_GREY str

Crow grey color.

SEAL_GREY str

Seal grey color.

OCEAN_BLUE str

Ocean blue color.

TIGER_ORANGE str

Tiger orange color.

PARADISE_GREEN str

Paradise green color.

RIVER_BLUE str

River blue color.

ASHES_GREY str

Ashes grey color.

RHINO_GREY str

Rhino grey color.

ENGINEAI_BLUE str

EngineAI blue color.

TROPICAL_BLUE str

Tropical blue color.

JAVA str

Java color.

MEDIUM_TURQUOISE str

Medium turquoise color.

FUCHSIA_PINK str

Fuchsia pink color.

BANANA_YELLOW str

Banana yellow color.

JELLYFISH_GREEN str

Jellyfish green color.

FROG_GREEN str

Frog green color.

SPRING_GREEN str

Spring green color.

TEA_GREEN str

Tea green color.

LEMON_YELLOW str

Lemon yellow color.

GOLD_5 str

Gold 5 color.

PURPLE_7 str

Purple 7 color.

TEAL_5 str

Teal 5 color.

MAGENTA_7 str

Magenta 7 color.

BLUE_3 str

Blue 3 color.

BLUE_8 str

Blue 8 color.

PURPLE_4 str

Purple 4 color.

ORANGE_7 str

Orange 7 color.

OCEAN_4 str

Ocean 4 color.

PURPLE_9 str

Purple 9 color.

TRAFFIC_RED str

Traffic red color.

TRAFFIC_YELLOW str

Traffic yellow color.

TRAFFIC_GREEN str

Traffic green color.

LIGHTER_GREY str

Lighter grey color.

BLUE_POSITIVE_0 str

Blue positive 0 color.

BLUE_POSITIVE_1 str

Blue positive 1 color.

BLUE_POSITIVE_2 str

Blue positive 2 color.

BLUE_POSITIVE_3 str

Blue positive 3 color.

BLUE_POSITIVE_4 str

Blue positive 4 color.

RED_NEGATIVE_0 str

Red negative 0 color.

RED_NEGATIVE_1 str

Red negative 1 color.

RED_NEGATIVE_2 str

Red negative 2 color.

RED_NEGATIVE_3 str

Red negative 3 color.

RED_NEGATIVE_4 str

Red negative 4 color.

PaletteTypes #

Selection of color palettes.

Selection of different types of color palettes available.

Attributes:

Name Type Description
QUALITATIVE str

Qualitative palette type.

SEQUENTIAL str

Sequential palette type.

SequentialPalette #

Sequential Palette.

Sequential color palette for representing ordered data with gradual color transitions.

Attributes:

Name Type Description
FOREST_GREEN str

Forest green color.

PEACOCK_GREEN str

Peacock green color.

LAGOON_GREEN str

Lagoon green color.

MINT_GREEN str

Mint green color.

AQUA_GREEN str

Aqua green color.

FROST_GREEN str

Frost green color.

SequentialPaletteTwoSeries #

Sequential Palette for charts with two series.

Sequential color palette optimized for charts with exactly two data series.

Attributes:

Name Type Description
LAGOON_GREEN str

Lagoon green color.

FROST_GREEN str

Frost green color.

SequentialPaletteThreeSeries #

Sequential Palette for charts with three series.

Sequential color palette optimized for charts with exactly three data series.

Attributes:

Name Type Description
PEACOCK_GREEN str

Peacock green color.

MINT_GREEN str

Mint green color.

FROST_GREEN str

Frost green color.

PercentageAllPositiveSequentialPalette #

All Positive Sequential Palette.

Sequential color palette for representing all positive percentage values.

Attributes:

Name Type Description
POSITIVE_0 str

Positive 0 color.

POSITIVE_1 str

Positive 1 color.

POSITIVE_2 str

Positive 2 color.

POSITIVE_3 str

Positive 3 color.

POSITIVE_4 str

Positive 4 color.

PercentageAllNegativeSequentialPalette #

All Negative Sequential Palette.

Sequential color palette for representing all negative percentage values.

Attributes:

Name Type Description
NEGATIVE_0 str

Negative 0 color.

NEGATIVE_1 str

Negative 1 color.

NEGATIVE_2 str

Negative 2 color.

NEGATIVE_3 str

Negative 3 color.

NEGATIVE_4 str

Negative 4 color.

Icons#

Icons #

Layout icon enumeration.

Available icons for use in dashboard layouts and components. Each icon is represented by a string value.

Attributes:

Name Type Description
NOT_FOUND_404 str

404 error icon

ACCRETE str

Accrete icon

ARROW_DOWN str

Down arrow icon

ARROW_LEFT str

Left arrow icon

ARROW_LONG_DOWN str

Long down arrow icon

ARROW_LONG_LEFT str

Long left arrow icon

ARROW_LONG_RIGHT str

Long right arrow icon

ARROW_LONG_UP str

Long up arrow icon

ARROW_RIGHT str

Right arrow icon

BARS str

Bars/menu icon

BETWEEN str

Between operator icon

CHECK_SMALL str

Small check icon

CHECK str

Check/checkmark icon

CLOCK str

Clock/time icon

CLONE str

Clone/duplicate icon

CLOSE str

Close icon

CLOSE_SMALL str

Small close icon

COLLAPSE str

Collapse icon

COLUMN str

Column layout icon

CROSS_ASSET str

Cross asset icon

D3 str

D3 visualization icon

DASHBOARD_LINK str

Dashboard link icon

DEFAULT_TABLE_ICON str

Default table icon

DOUBLE_ARROW_DOWN str

Double down arrow icon

DOUBLE_ARROW_LEFT str

Double left arrow icon

DOUBLE_ARROW_RIGHT str

Double right arrow icon

DOUBLE_ARROW_UP str

Double up arrow icon

DRAG str

Drag handle icon

EDIT str

Edit/pencil icon

EQUAL str

Equal operator icon

ERROR_LIGHT str

Light error icon

ERROR str

Error icon

EXPAND str

Expand icon

EXTERNAL_LINK str

External link icon

FILE str

File icon

FILTER str

Filter icon

GREATER_EQUAL str

Greater than or equal operator icon

GREATER_THAN str

Greater than operator icon

HIERARCHY str

Hierarchy icon

HOME str

Home icon

HOURGLASS str

Hourglass icon

HOURGLASS_HD str

High definition hourglass icon

INDETERMINATE str

Indeterminate state icon

INDEX str

Index icon

INFO str

Information icon

INFO_LIGHT str

Light information icon

INFO_HELP str

Help information icon

LESS_EQUAL str

Less than or equal operator icon

LESS_THAN str

Less than operator icon

LOCK_HD str

High definition lock icon

LOCK str

Lock icon

LOGOUT str

Logout icon

MAIL str

Mail/email icon

MINUS str

Minus/subtract icon

MULTIPLE_SOURCES str

Multiple sources icon

NO_DATA str

No data available icon

PAUSE str

Pause icon

PLAY str

Play icon

PLUS str

Plus/add icon

RDK str

RDK icon

REFRESH str

Refresh icon

REPLAY str

Replay icon

REQUEST_SELECTION str

Request selection icon

SAVE str

Save icon

SCREENER str

Screener icon

SEARCH str

Search icon

SEARCH_BIG str

Large search icon

SP_GREY str

Grey S&P icon

SP str

S&P icon

STAR str

Star/favorite icon

STORIES str

Stories icon

TABLE str

Table view icon

TERMS str

Terms icon

TILES str

Tiles view icon

TRASH str

Trash/delete icon

TRINITY str

Trinity icon

UNION str

Union icon

USER str

User/profile icon

VERTICAL_DOTS str

Vertical dots menu icon

WATCHLIST str

Watchlist icon

WIDGET_MENU str

Widget menu icon

WORLD_BANK str

World Bank icon

ZOOM str

Zoom icon

SANKEY str

Sankey diagram icon

OVERVIEW str

Overview datatype icon

FLOWS str

Flows datatype icon

SENTIMENT str

Sentiment datatype icon

TRADE str

Trade datatype icon

FUNDAMENTALS str

Fundamentals datatype icon

TECHNICALS str

Technicals datatype icon

RISK_ESG str

Risk ESG datatype icon

ALL str

All datatypes icon

UBS str

UBS datasource icon

UBS_BANKS str

UBS banks datasource icon

IHS_MARKIT str

IHS Markit datasource icon

IHS_MARKIT_GREY str

Grey IHS Markit datasource icon

S_P str

S&P datasource icon

FACTSET str

FactSet datasource icon

FACTSET_GREY str

Grey FactSet datasource icon

RAVENPACK str

RavenPack datasource icon

RAVENPACK_GREY str

Grey RavenPack datasource icon

EPFR str

EPFR datasource icon

EPFR_GREY str

Grey EPFR datasource icon

ESTIMIZE str

Estimize datasource icon

ESTIMIZE_GREY str

Grey Estimize datasource icon

CARETTA str

Caretta datasource icon

CARETTA_GREY str

Grey Caretta datasource icon

DTCC str

DTCC datasource icon

DTCC_GREY str

Grey DTCC datasource icon

CFTC str

CFTC datasource icon

CFTC_GREY str

Grey CFTC datasource icon

XIGNITE str

Xignite datasource icon

XIGNITE_GREY str

Grey Xignite datasource icon

BARCHART str

Barchart datasource icon

COMPANY str

Company market icon

COUNTRY str

Country market icon

SECTOR str

Sector market icon

EQUITIES str

Equities market icon

FX str

Foreign exchange market icon

COMMODITIES str

Commodities market icon

FIXED_INCOME str

Fixed income market icon

CRYPTO str

Cryptocurrency market icon

COMING_SOON str

Coming soon placeholder icon

HIGHLIGHTS str

Highlights icon

Types#

ColorSpec module-attribute #

ColorSpec = Palette | Single | Gradient | DiscreteMap | str

Union type for color descriptions.

Union type representing various color descriptions including palettes, single colors, gradients, and discrete maps.

DiscreteMapItem module-attribute #

SequentialPaletteType module-attribute #