Format
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
Misode
2025-02-22 19:34:39 +01:00
parent 3f52a908a6
commit 331a4e2fe2

View File

@@ -52,16 +52,16 @@ export function generateColor() {
}
function intToUnsigned(n: number) {
n |= 0; // Force to signed 32-bit integer
return n < 0 ? n + 0x100000000 : n;
n |= 0 // Force to signed 32-bit integer
return n < 0 ? n + 0x100000000 : n
}
export function intToHexRgb(c: number | undefined) {
return c ? '#' + (c & 0xFFFFFF).toString(16).padStart(6, '0') : '#000000';
return c ? '#' + (c & 0xFFFFFF).toString(16).padStart(6, '0') : '#000000'
}
export function intToDisplayHexRgb(c: number | undefined) {
return c ? '#' + intToUnsigned(c).toString(16).toUpperCase().padStart(6, '0') : '#000000';
return c ? '#' + intToUnsigned(c).toString(16).toUpperCase().padStart(6, '0') : '#000000'
}
export function htmlEncode(str: string) {