Unverified Commit 4644b698 authored by Kim, Hyeonseo's avatar Kim, Hyeonseo Committed by GitHub
Browse files

Fix divisor in rgbTo256Color in cli/node.ts

parent cc1faf14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -285,7 +285,7 @@ function rgbTo256Color(r: number, g: number, b: number): number {
  ) {
    if (gray < 8) return 16; // Black
    if (gray > 248) return 231; // White
    return Math.round(((gray - 8) / 247) * 23) + 232;
    return Math.round(((gray - 8) / 240) * 23) + 232;
  }

  // Handle RGB colors (colors 16-231)