How many shades of blue do you need?
✓ Published0🌍 Public
TThanaporn-sk
Last edited Aug 23, 2017
Created on Aug 23, 2017
This example shows how many discrete shades of blue are needed to create a smooth gradient from light to dark. It displays a series of horizontal rows, each containing a different number of color swatches, from 2 to 40, using a predefined array of seven blue hex values. The visualization uses d3.scaleLinear to interpolate between those colors and d3.scaleBand for positioning the rectangles and text labels. Each rectangle is rendered as an SVG rect with its fill computed from the interpolated color scale.
AI-generated descriptionBuilt with blockbuilder.org
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/e1dfcba5740c8a847fab03bfef166bea'>How many shades of blue do you need?</a>
mit Licensed