[gnome-terminal] profile: New default colour scheme based on the GNOME 3.32 icon palette



commit f3c8464b75470434c960ebc23ce3bd116bf65313
Author: Calvin Walton <calvin walton kepstin ca>
Date:   Mon Mar 16 21:25:33 2020 +0100

    profile: New default colour scheme based on the GNOME 3.32 icon palette
    
    Also use these colours for foreground and background, when not using theme colours.
    
    I chose colours from the palette to provide good contrast in a wide
    variety of applications on both light and dark backgrounds, taking into
    account that the "Show bold text in bright colors" option is now off by
    default.
    
    The explanation behind some of the colour choices:
    
    * I chose pure white for slot 15, since it works better as a light
      terminal background colour than grey (better contrast vs green, cyan)
    * To improve contrast in blue-background applications, I chose a darker
      blue along with a brighter green and cyan. The dark blue desired was
      darker than available on the palette, so I made a darker blue by
      blending Blue 5 with Dark 4.
    * To provide extra personality, reference the classic CGA/VGA palette,
      and improve readability on light backgrounds, I picked a middle Brown
      tone for slot 3 rather than make up a muddy "dark yellow".
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-terminal/issues/72

 src/org.gnome.Terminal.gschema.xml | 36 ++++++++++++++++-----------------
 src/preferences.ui                 |  5 ++++-
 src/profile-editor.c               | 41 +++++++++++++++++++++++++++++++++-----
 3 files changed, 58 insertions(+), 24 deletions(-)
---
diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml
index be6205d6..85c388f1 100644
--- a/src/org.gnome.Terminal.gschema.xml
+++ b/src/org.gnome.Terminal.gschema.xml
@@ -135,12 +135,12 @@
       <description>Human-readable name of the profile.</description>
     </key>
     <key name="foreground-color" type="s">
-      <default>'#D3D7CF'</default>
+      <default>'rgb(36,31,49)'</default>
       <summary>Default color of text in the terminal</summary>
       <description>Default color of text in the terminal, as a color specification (can be HTML-style hex 
digits, or a color name such as “red”).</description>
     </key>
     <key name="background-color" type="s">
-      <default>'#2E3436'</default>
+      <default>'rgb(255,255,255)'</default>
       <summary>Default color of terminal background</summary>
       <description>Default color of terminal background, as a color specification (can be HTML-style hex 
digits, or a color name such as “red”).</description>
     </key>
@@ -294,22 +294,22 @@
       <description>Run this command in place of the shell, if use_custom_command is true.</description>
     </key>
     <key name="palette" type="as">
-      <default>["#2E3436",
-                "#CC0000",
-                "#4E9A06",
-                "#C4A000",
-                "#3465A4",
-                "#75507B",
-                "#06989A",
-                "#D3D7CF",
-                "#555753",
-                "#EF2929",
-                "#8AE234",
-                "#FCE94F",
-                "#729FCF",
-                "#AD7FA8",
-                "#34E2E2",
-                "#EEEEEC"]</default>
+      <default>['rgb(36,31,49)',
+                'rgb(192,28,40)',
+                'rgb(38,162,105)',
+                'rgb(181,131,90)',
+                'rgb(30,80,152)',
+                'rgb(163,71,186)',
+                'rgb(48,183,203)',
+                'rgb(222,221,218)',
+                'rgb(94,92,100)',
+                'rgb(237,51,59)',
+                'rgb(51,209,122)',
+                'rgb(248,228,92)',
+                'rgb(28,113,216)',
+                'rgb(192,97,203)',
+                'rgb(56,218,243)',
+                'rgb(255,255,255)']</default>
       <summary>Palette for terminal applications</summary>
     </key>
     <key name="font" type="s">
diff --git a/src/preferences.ui b/src/preferences.ui
index a6cf07d2..fef8fec8 100644
--- a/src/preferences.ui
+++ b/src/preferences.ui
@@ -210,6 +210,9 @@
       <column type="gchararray"/>
     </columns>
     <data>
+      <row>
+        <col id="0" translatable="yes" comments="This is the name of a colour scheme">GNOME</col>
+      </row>
       <row>
         <col id="0" translatable="yes" comments="This is the name of a colour scheme">Tango</col>
       </row>
@@ -2431,4 +2434,4 @@
       </object>
     </child>
   </object>
-</interface>
+</interface>
\ No newline at end of file
diff --git a/src/profile-editor.c b/src/profile-editor.c
index f2e8bd45..320a9785 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -174,6 +174,16 @@ static const TerminalColorScheme color_schemes[] = {
     COLOR (0xff, 0xff, 0xff),
     COLOR (0x00, 0x00, 0x00)
   },
+  /* Translators: "GNOME" is the name of a colour scheme, "light" can be translated */
+  { N_("GNOME light"),
+    COLOR (0x24, 0x1f, 0x31),  /* Dark 4 */
+    COLOR (0xff, 0xff, 0xff)   /* Light 1 */
+  },
+  /* Translators: "GNOME" is the name of a colour scheme, "dark" can be translated */
+  { N_("GNOME dark"),
+    COLOR (0xde, 0xdd, 0xda),  /* Light 3 */
+    COLOR (0x24, 0x1f, 0x31)   /* Dark 4 */
+  },
   /* Translators: "Tango" is the name of a colour scheme, "light" can be translated */
   { N_("Tango light"),
     COLOR (0x2e, 0x34, 0x36),
@@ -200,16 +210,37 @@ static const TerminalColorScheme color_schemes[] = {
 
 enum
 {
-  TERMINAL_PALETTE_TANGO     = 0,
-  TERMINAL_PALETTE_LINUX     = 1,
-  TERMINAL_PALETTE_XTERM     = 2,
-  TERMINAL_PALETTE_RXVT      = 3,
-  TERMINAL_PALETTE_SOLARIZED = 4,
+  TERMINAL_PALETTE_GNOME     = 0,
+  TERMINAL_PALETTE_TANGO     = 1,
+  TERMINAL_PALETTE_LINUX     = 2,
+  TERMINAL_PALETTE_XTERM     = 3,
+  TERMINAL_PALETTE_RXVT      = 4,
+  TERMINAL_PALETTE_SOLARIZED = 5,
   TERMINAL_PALETTE_N_BUILTINS
 };
 
 static const GdkRGBA terminal_palettes[TERMINAL_PALETTE_N_BUILTINS][TERMINAL_PALETTE_SIZE] =
 {
+  /* GNOME 3.32 palette: https://developer.gnome.org/hig/stable/icon-design.html.en#palette */
+  {
+    COLOR (0x24, 0x1f, 0x31),  /* Dark 4 */
+    COLOR (0xc0, 0x1c, 0x28),  /* Red 4 */
+    COLOR (0x26, 0xa2, 0x69),  /* Green 5 */
+    COLOR (0xb5, 0x83, 0x5a),  /* Brown 2 */
+    COLOR (0x1e, 0x50, 0x98),  /* Linear blend 33% Dark 4 over Blue 5 */
+    COLOR (0xa3, 0x47, 0xba),  /* Purple 3 */
+    COLOR (0x30, 0xb7, 0xcb),  /* Linear addition Blue 5 + Green 5 */
+    COLOR (0xde, 0xdd, 0xda),  /* Light 3 */
+    COLOR (0x5e, 0x5c, 0x64),  /* Dark 2 */
+    COLOR (0xed, 0x33, 0x3b),  /* Red 2 */
+    COLOR (0x33, 0xd1, 0x7a),  /* Green 3 */
+    COLOR (0xf8, 0xe4, 0x5c),  /* Yellow 2 */
+    COLOR (0x1c, 0x71, 0xd8),  /* Blue 4 */
+    COLOR (0xc0, 0x61, 0xcb),  /* Purple 2 */
+    COLOR (0x38, 0xda, 0xf3),  /* Linear addition Blue 4 + Green 4 */
+    COLOR (0xff, 0xff, 0xff)   /* Light 1 */
+  },
+
   /* Tango palette */
   {
     COLOR (0x2e, 0x34, 0x36),


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