Data visualization is crucial for clear communication, but inconsistent color usage can hinder comprehension and create visual noise.
Chart Color Tokens provide a unified, robust, and accessible system for coloring data visualizations across all Dialpad products.
These tokens are designed to:
Ensure Visual Consistency: Guarantee a cohesive look and feel for data insights.
Enhance Accessibility: Provide high-contrast, color-blind friendly palettes out-of-the-box.
Streamline Workflow: Offer a single source of truth for both designers and developers, reducing guesswork and speeding up development.
Improve Maintainability: Simplify global color updates and future-proof our data experiences.
Use for data visualizations that only require comparing one or two data points, or a single data point against a series of adjacent neutral data. Use chart.color.accent as the default. To bring a data point to focus, use chart.color.accent for the focused data point and chart.color.neutral for the rest.
Apply unique colors to distinguish two or more unrelated data where color carries no meaning. Use in the predetermined numerical order, e.g. 01, 02, etc. This ensures applied data can be visually distinguished from its adjacent data.
When to Use:
Multi-series bar charts, pie charts, or line charts comparing different groups.
To represent data using progressive shades or tints of a single color, emphasizing their relative depth within a single data series.
When to Use:
Single-series charts where visual depth or intensity within one category is key.
Heatmaps or density visualizations for a single metric.
Situations requiring a strong visual connection to the Dialpad brand.
Sequential Range
Using sequential range tokens enable the ability to dynamically create varying number of color steps for a single data series with start and end tokens.
Preview
Token Name
PX
var(--dt-color-chart-sequential-range-00-start)
var(--dt-color-chart-sequential-range-00-end)
var(--dt-color-chart-sequential-range-01-start)
var(--dt-color-chart-sequential-range-01-end)
var(--dt-color-chart-sequential-range-02-start)
var(--dt-color-chart-sequential-range-02-end)
var(--dt-color-chart-sequential-range-03-start)
var(--dt-color-chart-sequential-range-03-end)
var(--dt-color-chart-sequential-range-04-start)
var(--dt-color-chart-sequential-range-04-end)
var(--dt-color-chart-sequential-range-05-start)
var(--dt-color-chart-sequential-range-05-end)
var(--dt-color-chart-sequential-range-06-start)
var(--dt-color-chart-sequential-range-06-end)
var(--dt-color-chart-sequential-range-07-start)
var(--dt-color-chart-sequential-range-07-end)
var(--dt-color-chart-sequential-range-08-start)
var(--dt-color-chart-sequential-range-08-end)
var(--dt-color-chart-sequential-range-09-start)
var(--dt-color-chart-sequential-range-09-end)
var(--dt-color-chart-sequential-range-10-start)
var(--dt-color-chart-sequential-range-10-end)
Sequential Default
The default range are a fixed number of 10 available colors for a single data series. If you need to create fewer or more colors, use the sequential range tokens.
Apply to chart elements (bars, lines, fills) via CSS Variables (e.g. var(--dp-color-chart-color-accent)) or corresponding CSS Utilities, e.g. d-bgc-chart-neutral, d-bc-chart-warning, etc.
Applying Colors: Apply color directly to chart elements (bars, lines, fills) via Figma Styles linked to tokens. Unlike other Dialtone colors, Chart Colors are not scoped to foreground, surface, border, etc.
Understanding Hover/Selected: Remember that hover and selected states for specific chart series (single color, semantic, categorical, and sequential) have predetermined contrasting colors, ensuring consistent interaction feedback.
Prototyping: Use these tokens in your Figma prototypes to demonstrate interactive states and theme switching.
Use chart colors for the data itself, not for other purposes.
Don’t
Do not use chart colors for non-data purposes, e.g. supporting text labels, grid lines, etc. Use Dialtone's semantic colors for those purposes, e.g. "foreground primary", "border subtle", "background secondary", etc.
While this system aims for robustness, be aware of potential challenges during implementation and adoption:
Charting Library Overrides: Some charting libraries might aggressively override inline styles or custom properties, requiring careful mapping or deeper customization.
Complex Color Logic: For very custom data-driven color calculations beyond simple references (e.g., dynamic gradients based on data range), you might still need to implement logic in code that consumes these Chart Color design tokens.
Transitioning Existing Charts: Migrating older charts not using design tokens will require dedicated refactoring effort.