From 3ce3eab2b0ae44ab3e6e573dd317ca3119e3db1a Mon Sep 17 00:00:00 2001 From: Ramojus Lapinskas Date: Fri, 30 Aug 2024 10:40:05 +0300 Subject: [PATCH 1/2] chore(mellifluous): remove bg_contrast option --- README.md | 3 +-- .../colors/colorsets/mellifluous.lua | 21 +++---------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ee09da9..55698aa 100644 --- a/README.md +++ b/README.md @@ -126,8 +126,7 @@ Default config: ```lua require("mellifluous").setup({ mellifluous = { - neutral = true, -- set this to false and bg_contrast to "medium" for original mellifluous (then it was called meliora theme) - bg_contrast = "medium", -- options: "soft", "medium", "hard" + neutral = true, -- set this to false for original mellifluous (when it was called meliora theme) }, }) ``` diff --git a/lua/mellifluous/colors/colorsets/mellifluous.lua b/lua/mellifluous/colors/colorsets/mellifluous.lua index e5e17ae..fc857f7 100644 --- a/lua/mellifluous/colors/colorsets/mellifluous.lua +++ b/lua/mellifluous/colors/colorsets/mellifluous.lua @@ -6,16 +6,9 @@ local colorset_name = "mellifluous" function M.get_bg_dark() local config = require("mellifluous.config").config local mellifluous_config = config[colorset_name] - local is_neutral = mellifluous_config.neutral - local brightness = 11.5 - if mellifluous_config.bg_contrast == "hard" then - brightness = brightness - 2 - elseif mellifluous_config.bg_contrast == "soft" then - brightness = brightness + 2 - end - if is_neutral then + if mellifluous_config.neutral then return color.new_from_hsl({ h = 0, s = 0, l = brightness }) end return color.new_from_hsl({ h = 24, s = 10, l = brightness }) @@ -24,16 +17,9 @@ end function M.get_bg_light() local config = require("mellifluous.config").config local mellifluous_config = config[colorset_name] - local is_neutral = mellifluous_config.neutral - local brightness = 91.5 - if mellifluous_config.bg_contrast == "hard" then - brightness = brightness + 2 - elseif mellifluous_config.bg_contrast == "soft" then - brightness = brightness - 2 - end - if is_neutral then + if mellifluous_config.neutral then return color.new_from_hsl({ h = 0, s = 0, l = brightness }) end return color.new_from_hsl({ h = 24, s = 10, l = brightness }) @@ -113,8 +99,7 @@ end function M.get_config() return { - neutral = true, -- set this to false and bg_contrast to 'medium' for original mellifluous (then it was called mellifluous theme) - bg_contrast = "medium", -- options: 'soft', 'medium', 'hard' + neutral = true, } end From 8e402039810038a327924dab2222b48bb2b1bf1a Mon Sep 17 00:00:00 2001 From: ramojus Date: Fri, 30 Aug 2024 07:40:28 +0000 Subject: [PATCH 2/2] chore(ci): auto generate docs --- doc/mellifluous.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/mellifluous.txt b/doc/mellifluous.txt index 1f3bcee..f30b72a 100644 --- a/doc/mellifluous.txt +++ b/doc/mellifluous.txt @@ -146,8 +146,7 @@ Default config: >lua require("mellifluous").setup({ mellifluous = { - neutral = true, -- set this to false and bg_contrast to "medium" for original mellifluous (then it was called meliora theme) - bg_contrast = "medium", -- options: "soft", "medium", "hard" + neutral = true, -- set this to false for original mellifluous (when it was called meliora theme) }, }) <