BREAKING CHANGE: rename "contrast" to "saturated" throughout codebase

This change renames all occurrences of "contrast" to "saturated" to better describe the functionality:
- Config option `foreground` now accepts "saturated" instead of "contrast"
- All internal color palette variables renamed from *Contrast to *Saturated
- Documentation updated to reflect the new terminology

Migration guide:
- If using `foreground = "contrast"`, change to `foreground = "saturated"`
- If using `foreground = { dark = "contrast", light = "contrast" }`, change to `foreground = { dark = "saturated", light = "saturated" }`
This commit is contained in:
Webhooked 2025-07-28 09:33:50 +02:00
commit d1ba9eaf7c
4 changed files with 115 additions and 115 deletions

View file

@ -27,7 +27,7 @@ M.config = {
---@type { dark: string, light: string }
background = { dark = "ink", light = "pearl" },
theme = "ink",
---@type { dark: "default"|"contrast", light: "default"|"contrast" }|"default"|"contrast"
---@type { dark: "default"|"saturated", light: "default"|"saturated" }|"default"|"saturated"
foreground = "default",
compile = false,
}
@ -88,7 +88,7 @@ function M.load(theme)
else
local foreground_setting = type(M.config.foreground) == "table" and M.config.foreground[vim.o.background]
or M.config.foreground
---@cast foreground_setting "default"|"contrast"
---@cast foreground_setting "default"|"saturated"
local colors =
require("kanso.colors").setup({ theme = theme, colors = M.config.colors, foreground = foreground_setting })
local highlights = require("kanso.highlights").setup(colors, M.config)
@ -128,7 +128,7 @@ function M.compile()
else
-- Fallback for backward compatibility
local foreground_str = M.config.foreground
---@cast foreground_str "default"|"contrast"
---@cast foreground_str "default"|"saturated"
local colors = require("kanso.colors").setup({
theme = theme,
colors = M.config.colors,