about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-08-02 21:36:57 +0200
committerbptato <nincsnevem662@gmail.com>2022-08-02 22:14:14 +0200
commit7de898bd05fd54f216009ebc3775a007fd92c417 (patch)
tree8ea375792a27977a79b5932bf6bc786b19b3ec5f /src/types
parent8f7eb1f7d0ec0cac610c5dcc73188fdbe1577def (diff)
downloadchawan-7de898bd05fd54f216009ebc3775a007fd92c417.tar.gz
Fix renderdocument setText etc.
Diffstat (limited to 'src/types')
-rw-r--r--src/types/color.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/types/color.nim b/src/types/color.nim
index e5f72158..d0e13544 100644
--- a/src/types/color.nim
+++ b/src/types/color.nim
@@ -211,3 +211,9 @@ converter toRGBColor*(i: RGBAColor): RGBColor =
 
 converter toRGBAColor*(i: RGBColor): RGBAColor =
   return RGBAColor(uint32(i) or 0xFF000000u32)
+
+func `$`*(color: CellColor): string =
+  if color.rgb:
+    "r" & $color.rgbcolor.r & "g" & $color.rgbcolor.g & "b" & $color.rgbcolor.b
+  else:
+    "tcolor" & $color.color