catppuccin clear colour

This commit is contained in:
Luca Conte 2025-03-06 16:50:17 +01:00
parent 4ad7e2e3d0
commit 27be22842b
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ async function init() {
gl.bindBuffer(gl.ARRAY_BUFFER, null);
// set clear colour
gl.clearColor(0.1, 0.1, 0.1, 1.0);
gl.clearColor(...hexToRgb("181825"), 1.0);
// start drawing
requestAnimationFrame(draw);
@ -171,7 +171,7 @@ async function draw() {
requestAnimationFrame(draw);
}
function hexColorToFloatArray(hex) {
function hexToRgb(hex) {
let r = parseInt(hex.substring(0, 2), 16) / 255;
let g = parseInt(hex.substring(2, 4), 16) / 255;
let b = parseInt(hex.substring(4, 6), 16) / 255;