From 919f2b3050c6b92e71e01afa5a233a88ba208a49 Mon Sep 17 00:00:00 2001 From: Andy Koppe <> Date: Thu, 24 Mar 2022 03:11:56 +0100 Subject: [PATCH] tweak Blue of Helmholtz-Kohlrausch themes (including luminous and new kohlrausch) --- src/config.c | 6 +++--- themes/helmholtz | 13 ++++++------- themes/kohlrausch | 49 +++++++++++++++++++++++++++++++++++++++++++++++ themes/luminous | 22 ++++++++++----------- 4 files changed, 68 insertions(+), 22 deletions(-) create mode 100644 themes/kohlrausch diff --git a/src/config.c b/src/config.c index 317945ae..93849f3e 100644 --- a/src/config.c +++ b/src/config.c @@ -272,8 +272,8 @@ const config default_cfg = { [RED_I] = RGB(216, 36, 51), [GREEN_I] = RGB( 28, 168, 0), [YELLOW_I] = RGB(192, 160, 0), - [BLUE_I] = RGB( 0, 72, 216), - [MAGENTA_I] = RGB(180, 60, 204), + [BLUE_I] = RGB( 0, 55, 220), + [MAGENTA_I] = RGB(177, 72, 198), [CYAN_I] = RGB( 0, 168, 154), [WHITE_I] = RGB(191, 191, 191), [BOLD_BLACK_I] = RGB( 96, 96, 96), @@ -281,7 +281,7 @@ const config default_cfg = { [BOLD_GREEN_I] = RGB( 0, 244, 0), [BOLD_YELLOW_I] = RGB(240, 240, 0), [BOLD_BLUE_I] = RGB( 85, 170, 255), - [BOLD_MAGENTA_I] = RGB(255, 102, 255), + [BOLD_MAGENTA_I] = RGB(255, 114, 255), [BOLD_CYAN_I] = RGB( 0, 240, 240), [BOLD_WHITE_I] = RGB(255, 255, 255) #endif diff --git a/themes/helmholtz b/themes/helmholtz index 314eab97..e355bdb7 100644 --- a/themes/helmholtz +++ b/themes/helmholtz @@ -3,9 +3,8 @@ # The aim of this theme is to provide vibrant colours where the normal and bold # levels each have approximately equal brightness. The exception is normal blue, # which is somewhat darker than the others as a compromise between readability -# on a black background and suitability as a background colour. The normal and -# bold variant of each colour have slightly different hues to help distinguish -# them. +# on a black background and suitability as a background colour. The variants of +# each colour have slightly different hues to help distinguish them. # # To level the colours, their luminance was calculated as follows: # - Gamma-expand the sRGB components by dividing each by 255 and applying the @@ -16,7 +15,7 @@ # # https://en.wikipedia.org/wiki/SRGB # -# The colours were then adjusted to achieve equal luminance. However, that did +# The colours were then adjusted to achieve equal luminance. However, that does # not actually yield colours with equal apparent brightness. This is due to the # "Helmholtz-Kohlrausch effect", which means that some saturated colours appear # brighter than others to the human eye. The theme is named after that. @@ -33,8 +32,8 @@ Black=0,0,0 Red=216,36,51 Green=28,168,0 Yellow=192,160,0 -Blue=0,72,216 -Magenta=180,60,204 +Blue=0,55,220 +Magenta=177,72,198 Cyan=0,168,154 White=191,191,191 @@ -43,6 +42,6 @@ BoldRed=255,102,102 BoldGreen=0,244,0 BoldYellow=240,240,0 BoldBlue=85,170,255 -BoldMagenta=255,102,255 +BoldMagenta=255,114,255 BoldCyan=0,240,240 BoldWhite=255,255,255 diff --git a/themes/kohlrausch b/themes/kohlrausch new file mode 100644 index 00000000..ddb7e0ce --- /dev/null +++ b/themes/kohlrausch @@ -0,0 +1,49 @@ +# "kohlrausch" colour theme for mintty +# +# The aim of this theme is to provide vibrant colours where the normal and bold +# levels each have approximately equal brightness. The variants of each colour +# have slightly different hues to help distinguish them. +# +# Unlike in the "helmholtz" scheme, the normal blue has a similar brightness to +# the other normal colours, which helps its readability but makes it less +# suitable as a background colour. +# +# To level the colours, their luminance was calculated as follows: +# - Gamma-expand the sRGB components by dividing each by 255 and applying the +# sRGB transfer function (which approximately means applying exponent 2.2). +# - Combine the components with formula Y = 0.2126 R + 0.7152 G + 0.0722 B. +# - Gamma-compress with the reverse transfer function (approximately: apply +# exponent 1/2.2). +# +# https://en.wikipedia.org/wiki/SRGB +# +# The colours were then adjusted to achieve equal luminance. However, that does +# not actually yield colours with equal apparent brightness. This is due to the +# "Helmholtz-Kohlrausch effect", which means that some saturated colours appear +# brighter than others to the human eye. The theme is named after that. +# +# https://en.wikipedia.org/wiki/Helmholtz-Kohlrausch_effect +# +# There doesn't appear to be a generally valid model for compensating for the +# effect, as it depends on observer, display device, and viewing environment. +# Hence, correction factors were determined experimentally, ranging from 1.0 +# for yellow to 1.45 for red, and the colour components adjusted accordingly. +# Of course, that is a highly subjective process ... + +Black=0,0,0 +Red=216,36,51 +Green=28,168,0 +Yellow=192,160,0 +Blue=0,102,255 +Magenta=177,72,198 +Cyan=0,168,154 +White=191,191,191 + +BoldBlack=96,96,96 +BoldRed=255,102,102 +BoldGreen=0,244,0 +BoldYellow=240,240,0 +BoldBlue=85,170,255 +BoldMagenta=255,114,255 +BoldCyan=0,240,240 +BoldWhite=255,255,255 diff --git a/themes/luminous b/themes/luminous index 9edd2413..f525f037 100644 --- a/themes/luminous +++ b/themes/luminous @@ -1,11 +1,8 @@ # "luminous" colour theme for mintty # # The aim of this theme is to provide vibrant colours where the normal and bold -# levels each have approximately equal luminance. The exception is normal blue, -# which is somewhat darker than the others as a compromise between readability -# on a black background and suitability as a background colour. The normal and -# bold variant of each colour have slightly different hues to help distinguish -# them. +# levels each have approximately equal luminance. The variants of each colour +# have slightly different hues to help distinguish them. # # To level the colours, their luminance was calculated as follows: # - Gamma-expand the sRGB components by dividing each by 255 and applying the @@ -23,15 +20,16 @@ # # https://en.wikipedia.org/wiki/Helmholtz-Kohlrausch_effect # -# See the "helmholtz" theme for an attempt to compensate for that. +# See also the "helmholtz" and "kohlrausch" themes that attempt to compensate +# for that. Black=0,0,0 -Red=216,0,18 -Green=21,126,0 -Yellow=126,105,0 -Blue=0,72,216 -Magenta=180,0,216 -Cyan=0,120,110 +Red=228,0,19 +Green=22,132,0 +Yellow=135,112,0 +Blue=0,102,255 +Magenta=190,0,228 +Cyan=0,128,117 White=191,191,191 BoldBlack=96,96,96