Browse Source

feat(jonathandarker): add JonathanDarker color scheme

Joe 1 year ago
parent
commit
3978e94ca4

+ 3 - 0
.config/.gitignore

@@ -4,3 +4,6 @@
 # ...except for these:
 !brew/
 !git/
+!jonathandarker/
+!tmux/
+!zsh/

+ 7 - 0
.config/jonathandarker/.gitignore

@@ -0,0 +1,7 @@
+# ignore everything...
+*
+!.gitignore
+# ...except for these:
+!README.md
+!palette.sh
+!banner.svg

+ 38 - 0
.config/jonathandarker/README.md

@@ -0,0 +1,38 @@
+<div align="center">
+    <h1><img src="banner.svg" alt="JonathanDarker"></h1>
+</div>
+
+JonathanDarker is a color scheme inspired by
+[JetBrain's](https://www.jetbrains.com/)
+[Darcula](https://jetbrains.com/help/idea/configuring-colors-and-fonts.html).
+
+The scheme retains many of the same colors used in its ancestor's palette, and
+aims to compose a clean, peaceful, and professional visual.
+
+The palette consists of 16 colors, corresponding to the values used in
+[Xterm](https://en.wikipedia.org/wiki/Xterm)'s 16 color protocol.
+
+| #   | Xterm Name      | Alacritty Name | Theme Name | Hex                                                             |
+| --- | --------------- | -------------- | ---------- | --------------------------------------------------------------- |
+| 0   | Black (System)  | Black          | Black      | `#2B2B2B` ![#2B2B2B](https://place-hold.it/16x16/2B2B2B/2B2B2B) |
+| 1   | Maroon (System) | Red            | Red        | `#CC3135` ![#CC3135](https://place-hold.it/16x16/CC3135/CC3135) |
+| 2   | Green (System)  | Green          | Green      | `#628854` ![#628854](https://place-hold.it/16x16/628854/628854) |
+| 3   | Olive (System)  | Yellow         | Orange     | `#DA7317` ![#DA7317](https://place-hold.it/16x16/DA7317/DA7317) |
+| 4   | Navy (System)   | Blue           | Cyan       | `#1A8AA4` ![#1A8AA4](https://place-hold.it/16x16/1A8AA4/1A8AA4) |
+| 5   | Purple (System) | Magenta        | Magenta    | `#C300B8` ![#C300B8](https://place-hold.it/16x16/C300B8/C300B8) |
+| 6   | Teal (System)   | Cyan           | Lilac      | `#8888CB` ![#8888CB](https://place-hold.it/16x16/8888CB/8888CB) |
+| 7   | Silver (System) | White          | Silver     | `#A6B8C8` ![#A6B8C8](https://place-hold.it/16x16/A6B8C8/A6B8C8) |
+| 8   | Grey (System)   | Bright Black   | Grey       | `#6F686B` ![#6F686B](https://place-hold.it/16x16/6F686B/6F686B) |
+| 9   | Red (System)    | Bright Red     | Burgundy   | `#B84116` ![#B84116](https://place-hold.it/16x16/B84116/B84116) |
+| 10  | Lime (System)   | Bright Green   | Chartreuse | `#9DC351` ![#9DC351](https://place-hold.it/16x16/9DC351/9DC351) |
+| 11  | Yellow (System) | Bright Yellow  | Yellow     | `#F0BD5A` ![#F0BD5A](https://place-hold.it/16x16/F0BD5A/F0BD5A) |
+| 12  | Blue (System)   | Bright Blue    | Blue       | `#5999BF` ![#5999BF](https://place-hold.it/16x16/5999BF/5999BF) |
+| 13  | Fuchsia (System | Bright Magenta | Plum       | `#9E5190` ![#9E5190](https://place-hold.it/16x16/9E5190/9E5190) |
+| 14  | Aqua (System)   | Bright Cyan    | Periwinkle | `#ADADFF` ![#ADADFF](https://place-hold.it/16x16/ADADFF/ADADFF) |
+| 15  | White (System)  | Bright White   | White      | `#EEEEEE` ![#EEEEEE](https://place-hold.it/16x16/EEEEEE/EEEEE)  |
+
+[`palette.sh`](./palette.sh) can be `source`'d to make the color palette
+available to other programs. The theme is best rendered as a light-on-dark
+theme, using Black as the background, Silver as the foreground, and Grey and
+White as accents. For a dark-on-light theme, a White background, Black
+foreground, and Grey and Silver accents works well.

File diff suppressed because it is too large
+ 23 - 0
.config/jonathandarker/banner.svg


+ 25 - 0
.config/jonathandarker/palette.sh

@@ -0,0 +1,25 @@
+#!/bin/sh
+# Base palette:
+export JONATHANDARKER_COLOR_00="#2B2B2B"
+export JONATHANDARKER_COLOR_01="#CC3135"
+export JONATHANDARKER_COLOR_02="#628854"
+export JONATHANDARKER_COLOR_03="#DA7317"
+export JONATHANDARKER_COLOR_04="#1A8AA4"
+export JONATHANDARKER_COLOR_05="#C300B8"
+export JONATHANDARKER_COLOR_06="#8888CB"
+export JONATHANDARKER_COLOR_07="#A6B8C8"
+export JONATHANDARKER_COLOR_08="#6F686B"
+export JONATHANDARKER_COLOR_09="#B84116"
+export JONATHANDARKER_COLOR_10="#9DC351"
+export JONATHANDARKER_COLOR_11="#F0BD5A"
+export JONATHANDARKER_COLOR_12="#5999BF"
+export JONATHANDARKER_COLOR_13="#9E5190"
+export JONATHANDARKER_COLOR_14="#ADADFF"
+export JONATHANDARKER_COLOR_15="#EEEEEE"
+# [b]ack[g]round, [f]ore[g]round, [b]ackground [a]lt, [f]oreground [a]lt
+# For UI purposes, these values should be used, so that a basic light mode can
+# be implemented just by overriding these values.
+export JONATHANDARKER_COLOR_BG="$JONATHANDARKER_COLOR_00"
+export JONATHANDARKER_COLOR_BA="$JONATHANDARKER_COLOR_08"
+export JONATHANDARKER_COLOR_FG="$JONATHANDARKER_COLOR_07"
+export JONATHANDARKER_COLOR_FA="$JONATHANDARKER_COLOR_15"

+ 5 - 0
.github/README.md

@@ -30,6 +30,11 @@ MacOS. See the subdirectory's [README.md](./.config/brew/README.md) for details.
 Configuration for [Git](https://git-scm.com/docs/), a free and open source
 distributed version control system.
 
+### [jonathandarker (`~/.config/jonathandarker/`)](./.config/jonathandarker/)
+
+A color scheme inspired by [JetBrain's](https://www.jetbrains.com/)
+[Darcula](https://jetbrains.com/help/idea/configuring-colors-and-fonts.html).
+
 </td>
 <td>
 </td>

+ 1 - 0
.gitignore

@@ -6,3 +6,4 @@
 # These should have their own .gitignore!
 !.config/
 !.github/
+!.scripts/

+ 5 - 0
.scripts/.gitignore

@@ -0,0 +1,5 @@
+# ignore everything...
+/*
+!.gitignore
+# ...except for these:
+!**/*.zsh

+ 61 - 0
.scripts/lightmode.zsh

@@ -0,0 +1,61 @@
+#!/bin/zsh
+
+toggled=false
+
+if [ "$1" = 'toggle' ]; then
+    osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'
+fi
+
+if defaults read -g AppleInterfaceStyle | grep -q Dark; then
+    if [ -f $LIGHTMODE_TOGGLE_FLAG_FILE ]; then
+        echo "Dark Mode activated"
+        rm $LIGHTMODE_TOGGLE_FLAG_FILE
+        toggled=true
+    fi
+else
+    if [ ! -f $LIGHTMODE_TOGGLE_FLAG_FILE ]; then
+        echo "Light Mode activated"
+        touch $LIGHTMODE_TOGGLE_FLAG_FILE
+        toggled=true
+    fi
+fi
+
+if [ $toggled = true ]; then
+    echo "Executing toggle"
+    # Read updated colors
+    source $ZDOTDIR/.zshenv
+    # Update Alacritty colors
+    echo "# Automatically generated color palette
+[bell]
+color = \"$JONATHANDARKER_COLOR_BG\"
+[colors.cursor]
+cursor = \"$JONATHANDARKER_COLOR_FA\"
+[colors.primary]
+background = \"$JONATHANDARKER_COLOR_BG\"
+foreground = \"$JONATHANDARKER_COLOR_FG\"
+[colors.normal]
+black = \"$JONATHANDARKER_COLOR_00\"
+red = \"$JONATHANDARKER_COLOR_01\"
+green = \"$JONATHANDARKER_COLOR_02\"
+yellow = \"$JONATHANDARKER_COLOR_03\"
+blue = \"$JONATHANDARKER_COLOR_04\"
+magenta = \"$JONATHANDARKER_COLOR_05\"
+cyan = \"$JONATHANDARKER_COLOR_06\"
+white = \"$JONATHANDARKER_COLOR_07\"
+[colors.bright]
+black = \"$JONATHANDARKER_COLOR_08\"
+red = \"$JONATHANDARKER_COLOR_09\"
+green = \"$JONATHANDARKER_COLOR_10\"
+yellow = \"$JONATHANDARKER_COLOR_11\"
+blue = \"$JONATHANDARKER_COLOR_12\"
+magenta = \"$JONATHANDARKER_COLOR_13\"
+cyan = \"$JONATHANDARKER_COLOR_14\"
+white = \"$JONATHANDARKER_COLOR_15\"
+" > $XDG_CONFIG_HOME/alacritty/.theme.toml
+    # Trigger color scheme change in all Neovim instances
+    find $XDG_RUNTIME_DIR/nvim.*.0 -print0 | \
+        xargs -t -0 -P 64 -I % \
+        nvim --clean --headless --server % --remote-expr \
+        "execute(\"colorscheme jonathandarker\")"
+fi
+

Some files were not shown because too many files changed in this diff