diff options
author | bptato <nincsnevem662@gmail.com> | 2022-08-02 21:36:57 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-08-02 22:14:14 +0200 |
commit | 7de898bd05fd54f216009ebc3775a007fd92c417 (patch) | |
tree | 8ea375792a27977a79b5932bf6bc786b19b3ec5f /src/types | |
parent | 8f7eb1f7d0ec0cac610c5dcc73188fdbe1577def (diff) | |
download | chawan-7de898bd05fd54f216009ebc3775a007fd92c417.tar.gz |
Fix renderdocument setText etc.
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/color.nim | 6 |
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 |