summaryrefslogtreecommitdiff
path: root/src/ui/color.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 09:57:42 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-08-06 09:57:42 +0300
commit54950e9ccc384a8000f6d39a74dc3dc615f38fbb (patch)
tree24f708c9a2d4db2859425e67885bd1a8309f8611 /src/ui/color.h
parentcde2c55d15eb912735dac1ea0c2743959cc85be9 (diff)
GmDocument: Improvements to color themes
Better light mode, and in dark mode either saturate the background or the foreground, but not both.
Diffstat (limited to 'src/ui/color.h')
-rw-r--r--src/ui/color.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ui/color.h b/src/ui/color.h
index c3cacf77..4f179534 100644
--- a/src/ui/color.h
+++ b/src/ui/color.h
@@ -60,6 +60,23 @@ enum iColorId {
60 max_ColorId 60 max_ColorId
61}; 61};
62 62
63iLocalDef isLink_ColorId(enum iColorId d) {
64 return d >= tmBadLink_ColorId;
65}
66iLocalDef isBackground_ColorId(enum iColorId d) {
67 return d == tmBackground_ColorId || d == tmBannerBackground_ColorId;
68}
69iLocalDef isText_ColorId(enum iColorId d) {
70 return d >= tmFirst_ColorId && !isBackground_ColorId(d);
71}
72iLocalDef isLinkText_ColorId(enum iColorId d) {
73 return d == tmLinkText_ColorId || d == tmHypertextLinkText_ColorId ||
74 d == tmGopherLinkText_ColorId;
75}
76iLocalDef isRegularText_ColorId(enum iColorId d) {
77 return isLinkText_ColorId(d) || d == tmParagraph_ColorId || d == tmFirstParagraph_ColorId;
78}
79
63#define mask_ColorId 0x3f 80#define mask_ColorId 0x3f
64#define permanent_ColorId 0x80 /* cannot be changed via escapes */ 81#define permanent_ColorId 0x80 /* cannot be changed via escapes */
65 82