tokyonight.nvim icon indicating copy to clipboard operation
tokyonight.nvim copied to clipboard

feature: use palette colors name instead of rgb in highlight specifications (patch provided)

Open damanis opened this issue 1 year ago • 3 comments

Did you check the docs?

  • [X] I have read all the tokyonight.nvim docs

Is your feature request related to a problem? Please describe.

No problems.

Describe the solution you'd like

A palette specifies RGB for all colors (red, blue, fg, etc.). These colors may be used for highlight rules, i.e. Comment = { bg = bg_dark} instead of Comment = {bg = "#010101"}. This change make possible override all related highlight by changing one color only.

Describe alternatives you've considered

As above

Additional context

There is a patch for night style (I get permissions denied in git push). 0001-replace-rgb-by-names-for-night-style.patch

damanis avatar Oct 07 '24 11:10 damanis

This is not how it works. That file is generated from lua/tokyonight/extra/lua.lua

Read https://github.com/folke/tokyonight.nvim#-contributing

Juhan280 avatar Oct 15 '24 07:10 Juhan280

@Juhan280 I mean not extra application support, but change the theme definition itself. If I change bg_dark in my neovim config file the theme will generated proper colors on fly? I read contributing section before send, but contribute requires permissions.

damanis avatar Oct 15 '24 08:10 damanis

I read contributing section before send, but contribute requires permissions.

If you never contributed through github, here is how to do it:

  1. Fork the repo
  2. Clone it
  3. create a new branch
  4. Make necessary changes
  5. Push the changes to yourfork
  6. Create pull request on the main repo

I mean not extra application support, but change the theme definition itself. If I change bg_dark in my neovim config file the theme will generated proper colors on fly?

Any change you make in extrasdirectory will get overwritten when running ./scripts/build. Also, in your patch you replaced most of the hex codes with undefined variables. They will return nil.

Juhan280 avatar Oct 15 '24 09:10 Juhan280

The lua extra is just generated as a reference. It's not actually used anywhwere.

You can already use the on_colors hook to change colors for the whole theme

folke avatar Oct 22 '24 10:10 folke