From 27be22842b58eb2b8dc6f4010adceaaa0c23fff1 Mon Sep 17 00:00:00 2001 From: Luca Conte Date: Thu, 6 Mar 2025 16:50:17 +0100 Subject: [PATCH] catppuccin clear colour --- src/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script.js b/src/script.js index d83d9fb..49cd249 100644 --- a/src/script.js +++ b/src/script.js @@ -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;