diff --git a/extras/alacritty_tokyonight_day.yml b/extras/alacritty_tokyonight_day.yml new file mode 100644 index 0000000..b1add14 --- /dev/null +++ b/extras/alacritty_tokyonight_day.yml @@ -0,0 +1,34 @@ +# TokyoNight Alacritty Colors +colors: + # Default colors + primary: + background: '0xe1e2e7' + foreground: '0x3760bf' + + # Normal colors + normal: + black: '0xe9e9ed' + red: '0xf52a65' + green: '0x587539' + yellow: '0x8c6c3e' + blue: '0x2e7de9' + magenta: '0x9854f1' + cyan: '0x007197' + white: '0x6172b0' + + # Bright colors + bright: + black: '0xa1a6c5' + red: '0xf52a65' + green: '0x587539' + yellow: '0x8c6c3e' + blue: '0x2e7de9' + magenta: '0x9854f1' + cyan: '0x007197' + white: '0x3760bf' + + indexed_colors: + - { index: 16, color: '0xb15c00' } + - { index: 17, color: '0xc64343' } + + \ No newline at end of file diff --git a/extras/fish_tokyonight_day.fish b/extras/fish_tokyonight_day.fish new file mode 100644 index 0000000..00d6736 --- /dev/null +++ b/extras/fish_tokyonight_day.fish @@ -0,0 +1,35 @@ + # TokyoNight Color Palette + set -l foreground 3760bf + set -l selection 99a7df + set -l comment 848cb5 + set -l red f52a65 + set -l orange b15c00 + set -l yellow 8c6c3e + set -l green 587539 + set -l purple 7847bd + set -l cyan 007197 + set -l pink 9854f1 + + # Syntax Highlighting Colors + set -g fish_color_normal $foreground + set -g fish_color_command $cyan + set -g fish_color_keyword $pink + set -g fish_color_quote $yellow + set -g fish_color_redirection $foreground + set -g fish_color_end $orange + set -g fish_color_error $red + set -g fish_color_param $purple + set -g fish_color_comment $comment + set -g fish_color_selection --background=$selection + set -g fish_color_search_match --background=$selection + set -g fish_color_operator $green + set -g fish_color_escape $pink + set -g fish_color_autosuggestion $comment + + # Completion Pager Colors + set -g fish_pager_color_progress $comment + set -g fish_pager_color_prefix $cyan + set -g fish_pager_color_completion $foreground + set -g fish_pager_color_description $comment + + \ No newline at end of file diff --git a/extras/kitty_tokyonight_day.conf b/extras/kitty_tokyonight_day.conf new file mode 100644 index 0000000..f87aab2 --- /dev/null +++ b/extras/kitty_tokyonight_day.conf @@ -0,0 +1,40 @@ + # TokyoNight colors for Kitty + + background #e1e2e7 + foreground #3760bf + selection_background #99a7df + selection_foreground #3760bf + url_color #387068 + cursor #3760bf + + # Tabs + active_tab_background #2e7de9 + active_tab_foreground #d4d6e4 + inactive_tab_background #c4c8da + inactive_tab_foreground #8990b3 + #tab_bar_background #e9e9ed + + # normal + color0 #e9e9ed + color1 #f52a65 + color2 #587539 + color3 #8c6c3e + color4 #2e7de9 + color5 #9854f1 + color6 #007197 + color7 #6172b0 + + # bright + color8 #a1a6c5 + color9 #f52a65 + color10 #587539 + color11 #8c6c3e + color12 #2e7de9 + color13 #9854f1 + color14 #007197 + color15 #3760bf + + # extended colors + color16 #b15c00 + color17 #c64343 + \ No newline at end of file diff --git a/lua/tokyonight/colors.lua b/lua/tokyonight/colors.lua index ee0cc6e..9d81e0c 100644 --- a/lua/tokyonight/colors.lua +++ b/lua/tokyonight/colors.lua @@ -43,7 +43,9 @@ function M.setup(config) red1 = "#db4b4b", git = { change = "#6183bb", add = "#449dab", delete = "#914c54", conflict = "#bb7a61" }, } - if config.style == "night" or vim.o.background == "light" then colors.bg = "#1a1b26" end + if config.style == "night" or config.style == "day" or vim.o.background == "light" then + colors.bg = "#1a1b26" + end util.bg = colors.bg colors.diff = { @@ -83,6 +85,10 @@ function M.setup(config) util.color_overrides(colors, config) + if config.transform_colors and (config.style == "day" or vim.o.background == "light") then + return util.light_colors(colors) + end + return colors end diff --git a/lua/tokyonight/config.lua b/lua/tokyonight/config.lua index 672f3e4..70d9def 100644 --- a/lua/tokyonight/config.lua +++ b/lua/tokyonight/config.lua @@ -25,6 +25,7 @@ config = { dev = opt("dev", false), darkFloat = opt("dark_float", true), darkSidebar = opt("dark_sidebar", true), + transform_colors = false, } if config.style == "day" then vim.o.background = "light" end diff --git a/lua/tokyonight/extra/alacritty.lua b/lua/tokyonight/extra/alacritty.lua index 5ad278f..b0e0c2c 100644 --- a/lua/tokyonight/extra/alacritty.lua +++ b/lua/tokyonight/extra/alacritty.lua @@ -4,6 +4,7 @@ local M = {} function M.alacritty(config) config = config or require("tokyonight.config") + config.transform_colors = true local colors = require("tokyonight.colors").setup(config) local alacrittyColors = {} diff --git a/lua/tokyonight/extra/fish.lua b/lua/tokyonight/extra/fish.lua index 9d3030d..d2b0dd7 100644 --- a/lua/tokyonight/extra/fish.lua +++ b/lua/tokyonight/extra/fish.lua @@ -4,6 +4,7 @@ local M = {} function M.fish(config) config = config or require("tokyonight.config") + config.transform_colors = true local colors = require("tokyonight.colors").setup(config) local fishColors = {} diff --git a/lua/tokyonight/extra/init.lua b/lua/tokyonight/extra/init.lua index c9ca13a..1ef87ba 100644 --- a/lua/tokyonight/extra/init.lua +++ b/lua/tokyonight/extra/init.lua @@ -24,3 +24,9 @@ write(kitty.kitty(config), "kitty_tokyonight_night.conf") write(fish.fish(config), "fish_tokyonight_night.fish") write(alacritty.alacritty(config), "alacritty_tokyonight_night.yml") +config.style = "day" + +write(kitty.kitty(config), "kitty_tokyonight_day.conf") +write(fish.fish(config), "fish_tokyonight_day.fish") +write(alacritty.alacritty(config), "alacritty_tokyonight_day.yml") + diff --git a/lua/tokyonight/extra/kitty.lua b/lua/tokyonight/extra/kitty.lua index 7580f17..dd07445 100644 --- a/lua/tokyonight/extra/kitty.lua +++ b/lua/tokyonight/extra/kitty.lua @@ -4,6 +4,7 @@ local M = {} function M.kitty(config) config = config or require("tokyonight.config") + config.transform_colors = true local colors = require("tokyonight.colors").setup(config) local kitty = util.template([[ diff --git a/lua/tokyonight/util.lua b/lua/tokyonight/util.lua index cdb39bc..f5bced9 100644 --- a/lua/tokyonight/util.lua +++ b/lua/tokyonight/util.lua @@ -166,6 +166,13 @@ function util.terminal(colors) end end +function util.light_colors(colors) + if type(colors) == "string" then return util.getColor(colors) end + local ret = {} + for key, value in pairs(colors) do ret[key] = util.light_colors(value) end + return ret +end + ---@param theme Theme function util.load(theme) vim.cmd("hi clear")