HCL Interpolation II
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jun 4, 2015
A canvas displays a single horizontal strip of animated color that cycles through hues. The strip updates every frame using `d3.timer`, computing a gradient from one HCL color to another with `d3.interpolateHclLong`. The code writes RGB values into an `ImageData` buffer and draws it with `putImageData`, showing the long path between hues 360° apart.
AI-generated descriptionAnother example of HCL interpolation, except using interpolateHclLong to choose the longer path when interpolating between hues greater than 180° apart.
gpl-3.0 Licensed