From e46f0a4cb9b6a843e900dbb3abd5ce9684f47016 Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 10 Dec 2021 17:39:21 +0100 Subject: Support more colors, config.nim refactoring --- src/io/cell.nim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/io') diff --git a/src/io/cell.nim b/src/io/cell.nim index 9587e5dd..0b991a0a 100644 --- a/src/io/cell.nim +++ b/src/io/cell.nim @@ -194,12 +194,12 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int = if ip[pi] == 2: inc pi if pi + 2 < ip.len: - let r = uint8(ip[pi]) + let r = ip[pi] inc pi - let g = uint8(ip[pi]) + let g = ip[pi] inc pi - let b = uint8(ip[pi]) - formatting.fgcolor = CellColor(rgb: true, rgbcolor: (r: r, g: g, b: b)) + let b = ip[pi] + formatting.fgcolor = CellColor(rgb: true, rgbcolor: rgb(r, g, b)) else: #TODO inc pi @@ -216,12 +216,12 @@ proc parseAnsiCode*(formatting: var Formatting, buf: string, fi: int): int = if ip[pi] == 2: inc pi if pi + 2 < ip.len: - let r = uint8(ip[pi]) + let r = ip[pi] inc pi - let g = uint8(ip[pi]) + let g = ip[pi] inc pi - let b = uint8(ip[pi]) - formatting.bgcolor = CellColor(rgb: true, rgbcolor: (r: r, g: g, b: b)) + let b = ip[pi] + formatting.bgcolor = CellColor(rgb: true, rgbcolor: rgb(r, g, b)) else: #TODO inc pi -- cgit 1.4.1-2-gfad0