mirror of
https://github.com/joshdick/onedark.vim.git
synced 2025-11-08 11:03:49 -05:00
Terminal color tweaks. (#201)
* Add KiTTY configuration (manually; could potentially use https://github.com/stayradiated/termcolors/pull/17/ in the future) * Tweak foreground/background/white/black colors to be visually distinct from one another Closes #200.
This commit is contained in:
@@ -103,10 +103,17 @@ try {
|
||||
const xresources = readFileSync(resolve(__dirname, '../term/One Dark.Xresources'), 'utf8')
|
||||
const terminalPalette = termcolors.xresources.import(xresources)
|
||||
|
||||
let itermTemplate, terminalAppTemplate, alacrittyTemplate
|
||||
let alacrittyTemplate, itermTemplate, kittyTemplate, terminalAppTemplate
|
||||
|
||||
// Compile custom terminal color templates based on ones that ship with termcolors
|
||||
try {
|
||||
alacrittyTemplate = termcolors.export(
|
||||
readFileSync(resolve(__dirname, 'templates/One Dark.alacritty')),
|
||||
_.partialRight(_.mapValues, function (color) {
|
||||
return color.toHex().slice(1)
|
||||
})
|
||||
)
|
||||
|
||||
itermTemplate = termcolors.export(
|
||||
// From termcolors/lib/formats/iterm.js
|
||||
readFileSync(resolve(__dirname, 'templates/One Dark.itermcolors')),
|
||||
@@ -115,8 +122,8 @@ try {
|
||||
})
|
||||
)
|
||||
|
||||
alacrittyTemplate = termcolors.export(
|
||||
readFileSync(resolve(__dirname, 'templates/One Dark.alacritty')),
|
||||
kittyTemplate = termcolors.export(
|
||||
readFileSync(resolve(__dirname, 'templates/One Dark.kitty')),
|
||||
_.partialRight(_.mapValues, function (color) {
|
||||
return color.toHex().slice(1)
|
||||
})
|
||||
@@ -147,9 +154,10 @@ try {
|
||||
}
|
||||
|
||||
try {
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.itermcolors'), itermTemplate(terminalPalette))
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.terminal'), terminalAppTemplate(terminalPalette))
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.alacritty'), alacrittyTemplate(terminalPalette))
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.itermcolors'), itermTemplate(terminalPalette))
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.kitty'), kittyTemplate(terminalPalette))
|
||||
writeFileSync(resolve(__dirname, '../term/One Dark.terminal'), terminalAppTemplate(terminalPalette))
|
||||
} catch (e) {
|
||||
handleError('Error writing terminal color file', e)
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*.cursorColor: <%=white.gui%>
|
||||
|
||||
! black
|
||||
*.color0: <%=black.gui%>
|
||||
*.color8: <%=visual_grey.gui%>
|
||||
*.color0: <%=comment_grey.gui%>
|
||||
*.color8: <%=gutter_fg_grey.gui%>
|
||||
|
||||
! red
|
||||
*.color1: <%=red.gui%>
|
||||
@@ -33,5 +33,5 @@
|
||||
|
||||
! white
|
||||
*.color7: <%=white.gui%>
|
||||
*.color15: <%=comment_grey.gui%>
|
||||
*.color15: <%=visual_grey.gui%>
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x{{=c[0]}}'
|
||||
foreground: '0x{{=c[7]}}'
|
||||
foreground: '0x{{=c.foreground}}'
|
||||
background: '0x{{=c.background}}'
|
||||
|
||||
# Cursor colors
|
||||
cursor:
|
||||
|
||||
41
build/templates/One Dark.kitty
Normal file
41
build/templates/One Dark.kitty
Normal file
@@ -0,0 +1,41 @@
|
||||
# Cursor
|
||||
cursor #{{=c[7]}}
|
||||
cursor_text_color #{{=c[0]}}
|
||||
|
||||
# Special
|
||||
foreground #{{=c.foreground}}
|
||||
background #{{=c.background}}
|
||||
selection_foreground #{{=c[0]}}
|
||||
selection_background #{{=c[7]}}
|
||||
|
||||
# Black
|
||||
color0 #{{=c[0]}}
|
||||
color8 #{{=c[8]}}
|
||||
|
||||
# Red
|
||||
color1 #{{=c[1]}}
|
||||
color9 #{{=c[9]}}
|
||||
|
||||
# Green
|
||||
color2 #{{=c[2]}}
|
||||
color10 #{{=c[10]}}
|
||||
|
||||
# Yellow
|
||||
color3 #{{=c[3]}}
|
||||
color11 #{{=c[11]}}
|
||||
|
||||
# Blue
|
||||
color4 #{{=c[4]}}
|
||||
color12 #{{=c[12]}}
|
||||
|
||||
# Magenta
|
||||
color5 #{{=c[5]}}
|
||||
color13 #{{=c[13]}}
|
||||
|
||||
# Cyan
|
||||
color6 #{{=c[6]}}
|
||||
color14 #{{=c[14]}}
|
||||
|
||||
# White
|
||||
color7 #{{=c[7]}}
|
||||
color15 #{{=c[15]}}
|
||||
@@ -4,8 +4,8 @@
|
||||
*.cursorColor: #ABB2BF
|
||||
|
||||
! black
|
||||
*.color0: #282C34
|
||||
*.color8: #3E4452
|
||||
*.color0: #5C6370
|
||||
*.color8: #4B5263
|
||||
|
||||
! red
|
||||
*.color1: #E06C75
|
||||
@@ -33,5 +33,5 @@
|
||||
|
||||
! white
|
||||
*.color7: #ABB2BF
|
||||
*.color15: #5C6370
|
||||
*.color15: #3E4452
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x282c34'
|
||||
foreground: '0xabb2bf'
|
||||
background: '0x282c34'
|
||||
|
||||
# Cursor colors
|
||||
cursor:
|
||||
text: '0x282c34'
|
||||
text: '0x5c6370'
|
||||
cursor: '0xabb2bf'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x282c34'
|
||||
black: '0x5c6370'
|
||||
red: '0xe06c75'
|
||||
green: '0x98c379'
|
||||
yellow: '0xe5c07b'
|
||||
@@ -23,12 +23,12 @@ colors:
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x3e4452'
|
||||
black: '0x4b5263'
|
||||
red: '0xbe5046'
|
||||
green: '0x98c379'
|
||||
yellow: '0xd19a66'
|
||||
blue: '0x61afef'
|
||||
magenta: '0xc678dd'
|
||||
cyan: '0x56b6c2'
|
||||
white: '0x5c6370'
|
||||
white: '0x3e4452'
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Blue Component</key>
|
||||
<real>0.20392156862745098</real>
|
||||
<real>0.4392156862745098</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.17254901960784313</real>
|
||||
<real>0.38823529411764707</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.1568627450980392</real>
|
||||
<real>0.3607843137254902</real>
|
||||
</dict>
|
||||
<key>Ansi 1 Color</key>
|
||||
<dict>
|
||||
@@ -84,11 +84,11 @@
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Blue Component</key>
|
||||
<real>0.4392156862745098</real>
|
||||
<real>0.3215686274509804</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.38823529411764707</real>
|
||||
<real>0.26666666666666666</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.3607843137254902</real>
|
||||
<real>0.24313725490196078</real>
|
||||
</dict>
|
||||
<key>Ansi 2 Color</key>
|
||||
<dict>
|
||||
@@ -161,11 +161,11 @@
|
||||
<key>Color Space</key>
|
||||
<string>sRGB</string>
|
||||
<key>Blue Component</key>
|
||||
<real>0.3215686274509804</real>
|
||||
<real>0.38823529411764707</real>
|
||||
<key>Green Component</key>
|
||||
<real>0.26666666666666666</real>
|
||||
<real>0.3215686274509804</real>
|
||||
<key>Red Component</key>
|
||||
<real>0.24313725490196078</real>
|
||||
<real>0.29411764705882354</real>
|
||||
</dict>
|
||||
<key>Ansi 9 Color</key>
|
||||
<dict>
|
||||
|
||||
41
term/One Dark.kitty
Normal file
41
term/One Dark.kitty
Normal file
@@ -0,0 +1,41 @@
|
||||
# Cursor
|
||||
cursor #abb2bf
|
||||
cursor_text_color #5c6370
|
||||
|
||||
# Special
|
||||
foreground #abb2bf
|
||||
background #282c34
|
||||
selection_foreground #5c6370
|
||||
selection_background #abb2bf
|
||||
|
||||
# Black
|
||||
color0 #5c6370
|
||||
color8 #4b5263
|
||||
|
||||
# Red
|
||||
color1 #e06c75
|
||||
color9 #be5046
|
||||
|
||||
# Green
|
||||
color2 #98c379
|
||||
color10 #98c379
|
||||
|
||||
# Yellow
|
||||
color3 #e5c07b
|
||||
color11 #d19a66
|
||||
|
||||
# Blue
|
||||
color4 #61afef
|
||||
color12 #61afef
|
||||
|
||||
# Magenta
|
||||
color5 #c678dd
|
||||
color13 #c678dd
|
||||
|
||||
# Cyan
|
||||
color6 #56b6c2
|
||||
color14 #56b6c2
|
||||
|
||||
# White
|
||||
color7 #abb2bf
|
||||
color15 #3e4452
|
||||
@@ -6,7 +6,7 @@
|
||||
<data>
|
||||
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
|
||||
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
|
||||
LjE1Njg2Mjc0NTEgMC4xNzI1NDkwMTk2IDAuMjAzOTIxNTY4NgAQAYAC0hAREhNaJGNs
|
||||
LjM2MDc4NDMxMzcgMC4zODgyMzUyOTQxIDAuNDM5MjE1Njg2MwAQAYAC0hAREhNaJGNs
|
||||
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
|
||||
dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA
|
||||
AAAZAAAAAAAAAAAAAAAAAAAA2Q==
|
||||
@@ -24,7 +24,7 @@
|
||||
<data>
|
||||
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
|
||||
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
|
||||
LjI0MzEzNzI1NDkgMC4yNjY2NjY2NjY3IDAuMzIxNTY4NjI3NQAQAYAC0hAREhNaJGNs
|
||||
LjI5NDExNzY0NzEgMC4zMj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