summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-20 15:46:36 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-20 15:46:36 +0200
commite009da58e2184ed209d118acd8343ae47276eae1 (patch)
treeec89251af404743c5f0eb0b6a6a173358e1a9ead /src/gmdocument.c
parent404fa0c85e652fabfb58712bbaa8ee3694f8f81b (diff)
GmDocument: Gray/Black link color tuning
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index f0ffb34c..209ebe71 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -1201,7 +1201,7 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) {
1201 (theme == gray_GmDocumentTheme && isDark_ColorTheme(colorTheme_App()))) { 1201 (theme == gray_GmDocumentTheme && isDark_ColorTheme(colorTheme_App()))) {
1202 const float primHue = hues[primIndex]; 1202 const float primHue = hues[primIndex];
1203 const iHSLColor primBright = { primHue, 1, 0.6f, 1 }; 1203 const iHSLColor primBright = { primHue, 1, 0.6f, 1 };
1204 const iHSLColor primDim = { primHue, 1, normLum[primIndex] + (theme == gray_GmDocumentTheme ? 0.0f : -0.3f), 1}; 1204 const iHSLColor primDim = { primHue, 1, normLum[primIndex] + (theme == gray_GmDocumentTheme ? 0.0f : -0.25f), 1};
1205 const iHSLColor altBright = { altHue, 1, normLum[altIndex[0]] + (theme == gray_GmDocumentTheme ? 0.1f : 0.0f), 1 }; 1205 const iHSLColor altBright = { altHue, 1, normLum[altIndex[0]] + (theme == gray_GmDocumentTheme ? 0.1f : 0.0f), 1 };
1206 setHsl_Color(tmQuote_ColorId, altBright); 1206 setHsl_Color(tmQuote_ColorId, altBright);
1207 setHsl_Color(tmPreformatted_ColorId, altBright); 1207 setHsl_Color(tmPreformatted_ColorId, altBright);
@@ -1225,8 +1225,15 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) {
1225 /* Tone down the link colors a bit because bold white is quite strong to look at. */ 1225 /* Tone down the link colors a bit because bold white is quite strong to look at. */
1226 if (isDark_GmDocumentTheme(theme) || theme == white_GmDocumentTheme) { 1226 if (isDark_GmDocumentTheme(theme) || theme == white_GmDocumentTheme) {
1227 iHSLColor base = { hues[primIndex], 1.0f, normLum[primIndex], 1.0f }; 1227 iHSLColor base = { hues[primIndex], 1.0f, normLum[primIndex], 1.0f };
1228 set_Color(tmLinkText_ColorId, mix_Color(get_Color(tmLinkText_ColorId), 1228 if (theme == black_GmDocumentTheme || theme == gray_GmDocumentTheme) {
1229 rgb_HSLColor(base), 0.25f)); 1229 setHsl_Color(tmLinkText_ColorId,
1230 addSatLum_HSLColor(get_HSLColor(tmLinkText_ColorId), 0.0f, -0.15f));
1231 }
1232 else {
1233 /* Tinted with base color. */
1234 set_Color(tmLinkText_ColorId, mix_Color(get_Color(tmLinkText_ColorId),
1235 rgb_HSLColor(base), 0.25f));
1236 }
1230 set_Color(tmHypertextLinkText_ColorId, get_Color(tmLinkText_ColorId)); 1237 set_Color(tmHypertextLinkText_ColorId, get_Color(tmLinkText_ColorId));
1231 set_Color(tmGopherLinkText_ColorId, get_Color(tmLinkText_ColorId)); 1238 set_Color(tmGopherLinkText_ColorId, get_Color(tmLinkText_ColorId));
1232 } 1239 }