summaryrefslogtreecommitdiff
path: root/config/nvim/lua/theme
diff options
context:
space:
mode:
author2025-06-09 13:43:45 +0300
committer2025-06-09 13:55:38 +0300
commit97af93b2a8ebc89364852e3f63e9fd8cfedaeedf (patch)
tree27e2added74ee6c0ff91c9e7927491c661a8bb36 /config/nvim/lua/theme
parent04.06.2025 (diff)
downloaddotfiles-97af93b2a8ebc89364852e3f63e9fd8cfedaeedf.tar.gz
dotfiles-97af93b2a8ebc89364852e3f63e9fd8cfedaeedf.tar.bz2
dotfiles-97af93b2a8ebc89364852e3f63e9fd8cfedaeedf.tar.xz
dotfiles-97af93b2a8ebc89364852e3f63e9fd8cfedaeedf.zip
Перевёл dotfiles на stow
Diffstat (limited to 'config/nvim/lua/theme')
-rw-r--r--config/nvim/lua/theme/asset/hsv-to-rgb.lua29
-rw-r--r--config/nvim/lua/theme/colors.lua68
-rw-r--r--config/nvim/lua/theme/modifiers.lua16
3 files changed, 113 insertions, 0 deletions
diff --git a/config/nvim/lua/theme/asset/hsv-to-rgb.lua b/config/nvim/lua/theme/asset/hsv-to-rgb.lua
new file mode 100644
index 0000000..5a63f98
--- /dev/null
+++ b/config/nvim/lua/theme/asset/hsv-to-rgb.lua
@@ -0,0 +1,29 @@
+local function HsvToRgb(h, s, v)
+
+ s = s / 100.0
+ v = v / 100.0
+ h = h / 60.0
+
+ local i = math.floor(h) % 6
+ local f = h - math.floor(h)
+ local p = v * (1.0 - s)
+ local q = v * (1.0 - f * s)
+ local t = v * (1.0 - (1.0 - f) * s)
+
+ local r, g, b = 0, 0, 0
+
+ if i == 0 then r, g, b = v, t, p
+ elseif i == 1 then r, g, b = q, v, p
+ elseif i == 2 then r, g, b = p, v, t
+ elseif i == 3 then r, g, b = p, q, v
+ elseif i == 4 then r, g, b = t, p, v
+ else r, g, b = v, p, q
+ end
+
+ r = math.floor(r * 255 + 0.5)
+ g = math.floor(g * 255 + 0.5)
+ b = math.floor(b * 255 + 0.5)
+
+ return string.format("#%02x%02x%02x", r, g, b)
+end
+return HsvToRgb
diff --git a/config/nvim/lua/theme/colors.lua b/config/nvim/lua/theme/colors.lua
new file mode 100644
index 0000000..6197328
--- /dev/null
+++ b/config/nvim/lua/theme/colors.lua
@@ -0,0 +1,68 @@
+local HsvToRgb = require("theme.asset.hsv-to-rgb")
+local colors = {
+
+ black = {HsvToRgb(0, 0, 0), 0},--0 Black
+ black_l = {HsvToRgb(0, 0, 10), 0},
+ black_ll = {HsvToRgb(0, 0, 20), 0},
+
+ gray_dd = {HsvToRgb(0, 0, 30), 8},--8 DarkGray
+ gray_d = {HsvToRgb(0, 0, 40), 8},
+ gray = {HsvToRgb(0, 0, 50), 7},--7 Gray
+ gray_l = {HsvToRgb(0, 0, 60), 7},
+ gray_ll = {HsvToRgb(0, 0, 70), 7},
+
+ white_dd = {HsvToRgb(0, 0, 80), 15},--15 White
+ white_d = {HsvToRgb(0, 0, 90), 15},
+ white = {HsvToRgb(0, 0, 100), 15},
+
+ red_d = {HsvToRgb(0, 100, 75), 12},--12 Red
+ red = {HsvToRgb(0, 100, 100), 12},
+ red_l = {HsvToRgb(0, 75, 100), 12},
+
+ orange_d = {HsvToRgb(30, 100, 75), 4},--4 DarkRed
+ orange = {HsvToRgb(30, 100, 100), 4},
+ orange_l = {HsvToRgb(30, 75, 100), 4},
+
+ yellow_d = {HsvToRgb(60, 100, 75), 14},--14 Yellow
+ yellow = {HsvToRgb(60, 100, 100), 14},
+ yellow_l = {HsvToRgb(60, 75, 100), 14},
+
+ chartreuse_d = {HsvToRgb(90, 100, 75), 6},--6 DarkYellow
+ chartreuse = {HsvToRgb(90, 100, 100), 6},
+ chartreuse_l = {HsvToRgb(90, 75, 100), 6},
+
+ green_d = {HsvToRgb(120, 100, 75), 10},--10 Green
+ green = {HsvToRgb(120, 100, 100), 10},
+ green_l = {HsvToRgb(120, 75, 100), 10},
+
+ turquoise_d = {HsvToRgb(150, 100, 75), 2},--2 DarkGreen
+ turquoise = {HsvToRgb(150, 100, 100), 2},
+ turquoise_l = {HsvToRgb(150, 75, 100), 2},
+
+ cyan_d = {HsvToRgb(180, 100, 75), 11},--11 Cyan
+ cyan = {HsvToRgb(180, 100, 100), 11},
+ cyan_l = {HsvToRgb(180, 75, 100), 11},
+
+ royal_d = {HsvToRgb(210, 100, 75), 3},--3 DarkCyan
+ royal = {HsvToRgb(210, 100, 100), 3},
+ royal_l = {HsvToRgb(210, 75, 100), 3},
+
+ blue_d = {HsvToRgb(240, 100, 75), 9},--9 Blue
+ blue = {HsvToRgb(240, 100, 100), 9},
+ blue_l = {HsvToRgb(240, 75, 100), 9},
+
+ purple_d = {HsvToRgb(270, 100, 75), 1},--1 DarkBlue
+ purple = {HsvToRgb(270, 100, 100), 1},
+ purple_l = {HsvToRgb(270, 75, 100), 1},
+
+ pink_d = {HsvToRgb(300, 100, 75), 13},--13 Magenta
+ pink = {HsvToRgb(300, 100, 100), 13},
+ pink_l = {HsvToRgb(300, 75, 100), 13},
+
+ salmon_d = {HsvToRgb(330, 100, 75), 5},--5 DarkMagenta
+ salmon = {HsvToRgb(330, 100, 100), 5},
+ salmon_l = {HsvToRgb(330, 75, 100), 5},
+
+ none = {"NONE", "NONE"}
+}
+return colors
diff --git a/config/nvim/lua/theme/modifiers.lua b/config/nvim/lua/theme/modifiers.lua
new file mode 100644
index 0000000..5f5b853
--- /dev/null
+++ b/config/nvim/lua/theme/modifiers.lua
@@ -0,0 +1,16 @@
+local mods = {
+
+ bold = {"bold", "bold"},
+ italic = {"italic", "italic"},
+ underline = {"underline", "underline"},
+ underdouble = {"underdouble", "underdouble"},
+ underdoted = {"underdoted", "underdoted"},
+ underdashed = {"underdashed", "underdashed"},
+ undercurl = {"undercurl", "undercurl"},
+ reverse = {"reverse", "reverse"},
+ standout = {"standout", "standout"},
+ altfont = {"altfont", "altfont"},
+ strikethrough = {"strikethrough", "strikethrough"},
+ none = {"NONE", "NONE"}
+}
+return mods