Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bivariate Color Schemes

Public visualization

Viewing a saved revision (read-only)

c04b58cb2d63467cb9cb1bdc8e381728

Bivariate Color Schemes

0 stars0🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Sep 1, 2024

This example demonstrates bivariate color schemes for choropleth maps through a grid of color swatches. The visualization generates two color ramps using the `d3.cubehelix` function, each defined by a hue angle with varying luminance values, then interpolates between the two ramps with `d3.interpolateRgb` and `d3.interpolateCubehelix` to build a matrix of 25 colors. The resulting matrix is rendered as SVG rectangles, with the color of each cell reflecting the combined weight of two independent data dimensions. The code includes adjustable constants for color count, hue range, saturation, and luminance values.

AI-generated description

An example of automatically deriving color schemes from configurations of hues, luminance, and saturation.