Skip to content

Commit

Permalink
feat: add darker colorscheme variant with theme previews
Browse files Browse the repository at this point in the history
  • Loading branch information
lcssz committed Jan 5, 2025
1 parent d3df98f commit 43fc1e8
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 29 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ Main Theme repo can be found [here](https://github.com/eldritch-theme/eldritch)
<img src="python-screenshot.png" alt="Screenshot"/><br/>
</figure>

<details><summary><b>🌃 Darker palette screenshots</b></summary>

| Dashboard | Python and Lua Highlights | Zig Highlights |
|:-:|:-:|:-:|
| ![Dashboard on dark theme](dashboard-darker.png) | ![Python and Lua highlights comparison](py-lua.png) | ![Zig highlights](zig.png) |

</details>

### Installation

Using [lazy.nvim](https://github.com/folke/lazy.nvim):
Expand Down Expand Up @@ -77,6 +85,7 @@ If you want transparent background for all of fzf-lua you need to pass the follo
require("eldritch").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
palette = "default", -- Available options: "default" (standard palette), "darker" (darker variant)
transparent = false, -- Enable this to disable setting the background color
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
styles = {
Expand Down
Binary file added dashboard-darker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 46 additions & 1 deletion lua/eldritch/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,59 @@ M.default = {
},
}

---@class Palette
M.darker = {
none = "NONE",
bg = "#171928",
bg_dark = "#0f101a",
bg_highlight = "#1e2033",
fg = "#d8e6e6",
fg_dark = "#8e94b8",
fg_gutter = "#2d3249",
fg_gutter_light = "#4a5584",
terminal_black = "#2a2e45",
dark3 = "#445084",
comment = "#506299",
dark5 = "#3d4775",
visual = "#554971",
bg_visual = "#554971",
bright_cyan = "#2bafcc",
cyan = "#0396b3",
dark_cyan = "#0c7a94",
magenta = "#8b75d9",
magenta2 = "#94407a",
magenta3 = "#5c2644",
pink = "#d154a1",
purple = "#8b75d9",
orange = "#d4a666",
yellow = "#ccd663",
dark_yellow = "#a1a34d",
green = "#2dcc82",
bright_green = "#00cc68",
dark_green = "#299e64",
red = "#cc5860",
bright_red = "#cc2935",
git = {
change = "#506299",
add = "#2dcc82",
delete = "#cc5860"
},
gitSigns = {
add = "#2dcc82",
change = "#506299",
delete = "#cc5860"
},
}

---@return ColorScheme
function M.setup(opts)
opts = opts or {}
local config = require("eldritch.config")
local palette = config.options.palette or "default"

-- Color Palette
---@class ColorScheme: Palette
local colors = M.default
local colors = M[palette] or M.default

util.bg = colors.bg

Expand Down
1 change: 1 addition & 0 deletions lua/eldritch/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local M = {}
---@field on_highlights fun(highlights: Highlights, colors: ColorScheme)
local defaults = {
transparent = false, -- Enable this to disable setting the background color
palette = "default", -- Choose between 'default' or 'darker' mode
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
styles = {
-- Style to be applied to different syntax groups
Expand Down
28 changes: 0 additions & 28 deletions lua/eldritch/palette.lua

This file was deleted.

Binary file added py-lua.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added zig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 43fc1e8

Please sign in to comment.