summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-28 13:34:49 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-28 13:34:49 +0300
commit879d6247ea6d83cad9b68a0eb4d8929c981c2ac3 (patch)
tree5c116d0468fad676aa69ee5f26cadbc1cf02ff6c /src/gmdocument.c
parentee21b47945a745c67f4e8525cb7264262d1cf6fa (diff)
GmDocument: Tweaks in the dark color theme
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 0d104dde..65227568 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -816,6 +816,21 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) {
816 setHsl_Color(tmHeading3_ColorId, setLum_HSLColor(altBase, titleLum + 0.60f)); 816 setHsl_Color(tmHeading3_ColorId, setLum_HSLColor(altBase, titleLum + 0.60f));
817 817
818 setHsl_Color(tmParagraph_ColorId, addSatLum_HSLColor(base, 0.1f, 0.6f)); 818 setHsl_Color(tmParagraph_ColorId, addSatLum_HSLColor(base, 0.1f, 0.6f));
819
820// printf("heading3: %d,%d,%d\n", get_Color(tmHeading3_ColorId).r, get_Color(tmHeading3_ColorId).g, get_Color(tmHeading3_ColorId).b);
821// printf("paragr : %d,%d,%d\n", get_Color(tmParagraph_ColorId).r, get_Color(tmParagraph_ColorId).g, get_Color(tmParagraph_ColorId).b);
822// printf("delta : %d\n", delta_Color(get_Color(tmHeading3_ColorId), get_Color(tmParagraph_ColorId)));
823
824 if (delta_Color(get_Color(tmHeading3_ColorId), get_Color(tmParagraph_ColorId)) <= 80) {
825 /* Smallest headings may be too close to body text color. */
826 iHSLColor clr = get_HSLColor(tmParagraph_ColorId);
827 clr.lum = iMax(0.5f, clr.lum - 0.15f);
828 setHsl_Color(tmParagraph_ColorId, clr);
829 clr.lum = 1.0;
830 setHsl_Color(tmHeading3_ColorId,
831 addSatLum_HSLColor(get_HSLColor(tmHeading3_ColorId), 0, 0.15f));
832 }
833
819 setHsl_Color(tmFirstParagraph_ColorId, addSatLum_HSLColor(base, 0.2f, 0.72f)); 834 setHsl_Color(tmFirstParagraph_ColorId, addSatLum_HSLColor(base, 0.2f, 0.72f));
820 setHsl_Color(tmPreformatted_ColorId, (iHSLColor){ altHue2, 1.0f, 0.75f, 1.0f }); 835 setHsl_Color(tmPreformatted_ColorId, (iHSLColor){ altHue2, 1.0f, 0.75f, 1.0f });
821 set_Color(tmQuote_ColorId, get_Color(tmPreformatted_ColorId)); 836 set_Color(tmQuote_ColorId, get_Color(tmPreformatted_ColorId));