From 54950e9ccc384a8000f6d39a74dc3dc615f38fbb Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 6 Aug 2020 09:57:42 +0300 Subject: GmDocument: Improvements to color themes Better light mode, and in dark mode either saturate the background or the foreground, but not both. --- src/ui/color.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/ui/color.h') 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 { max_ColorId }; +iLocalDef isLink_ColorId(enum iColorId d) { + return d >= tmBadLink_ColorId; +} +iLocalDef isBackground_ColorId(enum iColorId d) { + return d == tmBackground_ColorId || d == tmBannerBackground_ColorId; +} +iLocalDef isText_ColorId(enum iColorId d) { + return d >= tmFirst_ColorId && !isBackground_ColorId(d); +} +iLocalDef isLinkText_ColorId(enum iColorId d) { + return d == tmLinkText_ColorId || d == tmHypertextLinkText_ColorId || + d == tmGopherLinkText_ColorId; +} +iLocalDef isRegularText_ColorId(enum iColorId d) { + return isLinkText_ColorId(d) || d == tmParagraph_ColorId || d == tmFirstParagraph_ColorId; +} + #define mask_ColorId 0x3f #define permanent_ColorId 0x80 /* cannot be changed via escapes */ -- cgit v1.2.3