Skip to main content
100%

fresh block

✓ Published0🌍 Public
EEE2dev
Last edited Mar 26, 2020
Created on Mar 26, 2020

This example demonstrates a pixel-level color manipulation technique using an HTML canvas. It displays a road sign image twice side-by-side: the original on the left and a recolored version on the right. The code loads a PNG file, draws it to the canvas, and then uses the `getImageData` and `putImageData` APIs to modify individual pixels. It shifts the hue of blue pixels toward green, and replaces specific red and light-red colors with custom RGB values. The implementation includes custom `rgbToHsl` and `hslToRgb` conversion functions to perform the hue adjustments in HSL color space.

AI-generated description
mit Licensed

Similar vizzes