metalelf0 / jellybeans-nvim

A port of jellybeans colorscheme for neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to overwrite specific colors

seb-mueller opened this issue · comments

I tried to change some colors but don't know how to do this.
Following the suggestions in lush, i.e. replacing harbour with jellybeans-nvim in the pasted code below didn't work

-- ~/.config/nvim/colors/my-harbour.lua
-- See create.md and rktjmp/lush-template for more details on what can go in this file.

vim.opt.background = 'dark'
vim.g.colors_name = 'my-harbour'

-- First we will need lush, and the colorscheme we wish to modify
local lush = require('lush')
local harbour = require('lush_colorscheme.harbour')

-- Now we will extend the colorscheme
local spec = lush.extends({harbour}).with(function()
  return {
    -- make the telescope popup look like the pmenu
    TelescopeNormal { harbour.Pmenu },
    -- you can now use TelescopeNormal just like any other group (ref, inherit, etc)
    TelescopeBorder { fg = TelescopeNormal.bg.li(20) },
    TelescopeTitle { fg = TelescopeNormal.bg, bg = TelescopeNormal.fg },
  }
end)

-- then pass the extended spec to lush for application
lush(spec)

Could you give an example on how to change colors? Thanks!

The issue seems on the lush side here, that it recommends using "lush_colorscheme" here but "lush_theme" elsewhere.
This worked for me (note the require("lush_theme...")

vim.opt.background = 'dark'
vim.g.colors_name = 'jellybeans-nvim-dark'

-- First we will need lush, and the colorscheme we wish to modify
local lush = require('lush')
local jellybeans = require('lush_theme.jellybeans-nvim')

local hsl = lush.hsl

local background = hsl("#000000")

-- we can apply modifications ontop of the existing colorscheme
local spec = lush.extends({jellybeans}).with(function()
  return {
    -- adjust background to be black
    Normal { bg = background, fg = jellybeans.Normal.fg },
  }
end)

-- then pass the extended spec to lush for application
lush(spec)

Note that the documentation upstream has been adjusted. I think this issue can be closed.