diff options
author | bptato <nincsnevem662@gmail.com> | 2022-02-14 23:37:31 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-02-14 23:40:53 +0100 |
commit | 5098a7a162a4cd7a33ed724d9266ed850013e155 (patch) | |
tree | 785f5c548ed72f9408c9356db1858428639918ec /src/types | |
parent | 051d22b17e4c270f925376824a2307ab65ef5aa5 (diff) | |
download | chawan-5098a7a162a4cd7a33ed724d9266ed850013e155.tar.gz |
Incomplete background-color implementation
Has numerous flaws which will have to be corrected later.
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/color.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types/color.nim b/src/types/color.nim index 588e59d3..3f8307de 100644 --- a/src/types/color.nim +++ b/src/types/color.nim @@ -1,3 +1,4 @@ +# TODO both should probably be distinct int32 type RGBColor* = distinct int @@ -52,3 +53,6 @@ func rgba*(r, g, b, a: int): RGBAColor = converter toRGBColor*(i: RGBAColor): RGBColor = return RGBColor(int(i) and 0xFFFFFF) + +converter toRGBAColor*(i: RGBColor): RGBAColor = + return RGBAColor(int(i) or 0xFF000000) |