avatar to main merge

I have completed the character creation screen on the avatar branch and am preparing to merge it into main.
This commit is contained in:
pricewowen
2026-05-23 23:24:36 -06:00
parent 8957ecb81d
commit 61f98866e8
39 changed files with 2361 additions and 436 deletions

View File

@@ -120,6 +120,16 @@ export function rgbToHex({ r, g, b }: RGB): string {
.join("")}`;
}
export function hslToHex(hsl: HSL): string {
const rgb = hslToRgb(hsl.h, hsl.s, hsl.l);
return rgbToHex(rgb);
}
export function hexToHsl(hex: string): HSL {
const rgb = hexToRgb(hex);
return rgbToHsl(rgb.r, rgb.g, rgb.b);
}
/** Tint a monochrome sprite by mapping pixel brightness to the target color. */
export function tintImageData(imageData: ImageData, color: RGB): void {
const { data } = imageData;