catppuccin clear colour
This commit is contained in:
parent
4ad7e2e3d0
commit
27be22842b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue