diff options
| author | bptato <nincsnevem662@gmail.com> | 2023-06-27 09:24:10 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2023-06-27 09:24:10 +0200 |
| commit | cd1a36414028cbd3028a5f87ca9b91a314f5464c (patch) | |
| tree | 06e13f10cff027223fb2d1bb0c382c046bdcdb11 /src/types | |
| parent | 4ba9ea50918bc2fac6a556765a0154e37bf4e65e (diff) | |
| download | chawan-cd1a36414028cbd3028a5f87ca9b91a314f5464c.tar.gz | |
term: convert 8-bit colors to ANSI
(Instead of crashing)
Diffstat (limited to 'src/types')
| -rw-r--r-- | src/types/color.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/types/color.nim b/src/types/color.nim index 09847147..a22ce1e5 100644 --- a/src/types/color.nim +++ b/src/types/color.nim @@ -36,6 +36,9 @@ func rgbcolor*(color: CellColor): RGBColor = func color*(color: CellColor): uint8 = cast[uint8](color.n) +func eightbit*(color: CellColor): EightBitColor = + EightBitColor(color.color) + func cellColor*(rgb: RGBColor): CellColor = return CellColor(rgb: true, n: uint32(rgb)) |