[gimp] themes: new "Middle Gray" theme.



commit d2cf2813dddcce8f80a9e764c9871d45512fe2a9
Author: Jehan <jehan girinstud io>
Date:   Mon Sep 26 18:18:18 2022 +0200

    themes: new "Middle Gray" theme.
    
    So what we read on the topic is to use (as base color) the gray which is
    perceptually half-way between black and white. Unfortunately it can mean
    different colors. For instance if using the sRGB TRC, the #808080 color is
    sometimes cited.
    
    Instead I went with the color LCH (50, 0, 0), i.e. with half perceptual
    lightness in "CIE LCH(ab) float" babl space, i.e. #777777 in sRGB. It
    corresponds to the 18.42% gray which is often refered to, so it seemed a fine
    choice.
    
    This replaces proposal in !683 because the contributor is not responding
    anymore, and also it uses the common theme base CSS files used by all other
    official themes.

 configure.ac            |  1 +
 themes/Gray/Makefile.am |  7 +++++
 themes/Gray/gimp.css    | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
 themes/Makefile.am      |  2 +-
 themes/meson.build      |  1 +
 5 files changed, 78 insertions(+), 1 deletion(-)
---
diff --git a/configure.ac b/configure.ac
index a9a4874f43..b7f1a78a09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3154,6 +3154,7 @@ icons/hicolor/Makefile
 themes/Makefile
 themes/Compact/Makefile
 themes/Default/Makefile
+themes/Gray/Makefile
 themes/System/Makefile
 data/Makefile
 data/brushes/Makefile
diff --git a/themes/Gray/Makefile.am b/themes/Gray/Makefile.am
new file mode 100644
index 0000000000..61a68aa5c0
--- /dev/null
+++ b/themes/Gray/Makefile.am
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+themedatadir = $(gimpdatadir)/themes/Gray
+
+themedata_DATA = gimp.css
+
+EXTRA_DIST = $(themedata_DATA)
diff --git a/themes/Gray/gimp.css b/themes/Gray/gimp.css
new file mode 100644
index 0000000000..cc60fa01e9
--- /dev/null
+++ b/themes/Gray/gimp.css
@@ -0,0 +1,68 @@
+/* Middle gray default variant for GIMP 3.0 */
+
+/* Our base color is "middle gray", which is often computed differently
+ * according to various definitions.
+ * We use the sRGB color #777777 (119, 119, 119) which is the conversion of LCH
+ * (50, 0, 0), i.e. a 50% perceptual lightness gray. In linear sRGB, this is the
+ * 18.42% gray.
+ */
+
+/* Hint for debugging themes:
+ * first enable the GTK inspector with
+   gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
+ * then (after restarting GIMP) call it up with ctrl+shift+i
+ * or from GIMP's UI: File > Debug > Start GtkInspector
+ */
+
+/* Basic foreground, background and border colors. */
+@define-color fg-color               black;
+@define-color bg-color               rgb(119,119,119);
+@define-color border-color           rgb(100,100,100);
+
+/********* Variants for foreground colors *********/
+
+/* In places where we want not as strongly contrasted text. */
+@define-color dimmed-fg-color        rgb(30,30,30);
+/* Disabled items, such as disabled actions in menus. */
+@define-color disabled-fg-color      rgb(60,60,60);
+/* Disabled buttons are dimmed even more (text needs to still be
+ * readable, but buttons design are usually enough. */
+@define-color disabled-button-color  rgb(80,80,80);
+
+/********* Variants for background colors *********/
+
+/* Background color for hovered items to "stick out". */
+@define-color hover-color            #bbbbbb;
+/* Background color when we want widgets-in-widgets to differenciate. It
+ * will usually be "less extreme", i.e. darker on a light theme, or
+ * lighter on a dark theme.
+ */
+@define-color widget-bg-color        rgb(100,100,100);
+/* Color for selected items, in particular when their usual background
+ * color is @widget-bg-color or @bg-color. It will usually be ligher on
+ * a light theme, or darker on a dark theme.
+ */
+@define-color selected-color         #898989;
+
+/* Background color more extreme in the theme tendency, i.e. darker on a
+ * dark theme, ligther on a light theme. */
+@define-color extreme-bg-color       #898989;
+/* Color for a selected item to "stick out" when @extreme-bg-color is
+ * used. It will usually be darker than @bg-color on a light theme,
+ * ligher on a dark theme.
+ */
+@define-color extreme-selected-color #656565;
+
+/********* Variants for border colors *********/
+
+@define-color strong-border-color    rgb(80,80,80);
+@define-color stronger-border-color  rgb(60,60,60);
+
+/********* Colors for special cases *********/
+
+@define-color scrollbar-slider-color rgb(60,60,60);
+@define-color scrollbar-trough-color #bbbbbb;
+
+@define-color ruler-color            rgba(100,100,100,0.3);
+
+@import url("../Default/common.css");
diff --git a/themes/Makefile.am b/themes/Makefile.am
index ca2c79cfe9..7a59319632 100644
--- a/themes/Makefile.am
+++ b/themes/Makefile.am
@@ -1,3 +1,3 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = System Default Compact
+SUBDIRS = System Default Compact Gray
diff --git a/themes/meson.build b/themes/meson.build
index 254c634209..222fa7a319 100644
--- a/themes/meson.build
+++ b/themes/meson.build
@@ -2,6 +2,7 @@ subdir('Default')
 subdir('Compact')
 
 themes = [
+  'Gray',
   'System',
 ]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]