RRethy / base16-nvim

Neovim plugin for building a sync base16 colorscheme. Includes support for Treesitter and LSP highlight groups.
MIT License
523 stars 77 forks source link

Helix base16_default theme. #92

Closed erlandsona closed 9 months ago

erlandsona commented 9 months ago

So my issue is the base16-default-dark/light themes have hard coded hex values.

Helix has base16_default & base16_terminal themes that pull from whatever the configured terminal 16 colors are and does a really nice job of matching the aesthetic well.

I've been running a custom lush.nvim theme for a while now but just installed some new plugins and figuring out the new highlight groups / links etc... is a massive pain.

What would be really nice is if I could get the equivalent Helix mapping of terminal 16 colors (background,foreground + ansi + brights) into Neovim.

I've tried naively mapping my wezterm colors into the 16 colors in the custom setup method like so .wezterm.lua

return {
  current = 'erlandsona',
  schemes = {
    erlandsona = {
      -- Inspired by Breeze Dark but w/ a Yellow foreground
      -- The default text color
      foreground = '#c5bd60',
      -- foreground = "olive",
      -- The default background color
      background = '#2e3436',
      ansi = { '#2b2a2a', '#f44336', '#4e9a06', '#f57900', '#3465a4', '#b218b2', '#18b2b2', '#b2b2b2' },
      brights = { '#686868', '#ff5454', '#8ae234', '#ce5c00', '#729fcf', '#ff54ff', '#54ffff', '#ffffff' },
local term = require'wezterm.colors'
local ansi = term.ansi
local brights = term.brights

-- Where's the Foreground / Background color specification?
require 'colorscheme'.setup {
   base00 = ansi[1], -- dark-gray
   base01 = ansi[2], -- dark red
   base02 = ansi[3], -- dark green
   base03 = ansi[4], -- dark orange
   base04 = ansi[5], -- dark blue
   base05 = ansi[6], -- dark magenta
   base06 = ansi[7], -- dark cyan
   base07 = ansi[8], -- light gray
}

You see the issue here right? The way Terminals expect you to specify colors doesn't match the way base16's styleguide suggests you specify colors.

Which means using this library even if I try to follow the style guide leaves me with inconsistencies a lack of shades for different hues.

Curious if / how people have resolved this in the past?

RRethy commented 9 months ago

I read this about 5 times and I'm still confused tbh, if I had to guess it's probably a duplicate of #18.

erlandsona commented 9 months ago

Yeh tough to strike the right balance between context and content. Thanks for the link to the cterm stuff... It seems the same but tbh even after 10yrs running Neovim and I still don't understand what termguicolors is supposed to do? 😅

Which means I also have no idea what cterm vs GUI stuff is related to why Neovim is such a pain to get it to read my terminal configured colors 🤷