effigy.im
effigy.im copied to clipboard
Convert SVG color generation from HSL to RGB
Purpose
Modify the SVG identicon generation process to use RGB color values instead of HSL. This change will improve the visual appearance and consistency of the generated SVG icons.
Description
The changes in this pull request include:
- Updating the
functions/lib/blockiesSVG.js
file:- Modifying the
createColor()
function to generate RGB values instead of HSL - Updating the
renderIdenticon()
function to use RGB color strings
- Modifying the
- Renaming the
functions/lib/hsl2rgb.js
file tofunctions/lib/rgb.js
and adding a new functioncreateRandomRGBColor()
to generate random RGB colors. - Adjusting any imports or requires in other files that reference
hsl2rgb.js
. - Adding unit tests in
functions/test/blockiesSVG.test.js
to ensure the new RGB color generation works correctly. - Updating comments in
functions/lib/blockiesSVG.js
to reflect the change from HSL to RGB.
Summary
- Updated
functions/lib/blockiesSVG.js
to use RGB colors instead of HSL - Renamed
functions/lib/hsl2rgb.js
tofunctions/lib/rgb.js
and addedcreateRandomRGBColor()
- Added unit tests for the new RGB color generation in
functions/test/blockiesSVG.test.js
- Updated comments in
functions/lib/blockiesSVG.js
to reflect the change
Fixes
#20. Continue the conversation here: https://app.sweep.dev/c/e6fa7d0c-d0ab-4b2f-bf76-a7aaea6a379f.
To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".
:book: For more information on how to use Sweep, please read our documentation.
Tracking ID: 49d33b19ed