From e116207672b55c6dfb240efd122d41f1498b4aa1 Mon Sep 17 00:00:00 2001 From: Seemebadnekai <51400137+SagarDevAchar@users.noreply.github.com> Date: Wed, 4 Sep 2024 01:36:51 +0530 Subject: [PATCH] fix: properly scale 2-bit color to 8-bit color (#9) --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 986de12..d4f4d56 100644 --- a/src/index.ts +++ b/src/index.ts @@ -132,9 +132,9 @@ function animationFrame(now: number) { if (vsync) { break frameLoop; } - data[offset] = r << 6; - data[offset + 1] = g << 6; - data[offset + 2] = b << 6; + data[offset] = r * 85; + data[offset + 1] = g * 85; + data[offset + 2] = b * 85; data[offset + 3] = 0xff; } waitFor(() => getVGASignals().hsync);