Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 2x 2x | export function colorCodedToRGB(color: number): { r: number; g: number; b: number; } { const r = (color >> 16) & 0xff; const g = (color >> 8) & 0xff; const b = color & 0xff; return { r, g, b }; } export function colorCodedToHex(color: number): string { const r = (color >> 16) & 0xff; const g = (color >> 8) & 0xff; const b = color & 0xff; return `#${r.toString(16)}${g.toString(16)}${b.toString(16)}`; } |