Skip to content

Converting lush colors to use with Kitty, Alacritty, AwesomeWM, etc #56

Answered by rktjmp
ashincoder asked this question in Q&A
Discussion options

You must be logged in to vote

You need to access the theme via some lua interpreter and write the colors out.

If you're doing this outside of vim you will have to add lush and the theme to lua's package path.

Something like this

-- export-theme.lua

-- adjust lua package path so it can find both lush, and the theme.
package.path = package.path
    .. ";/path/to/lush.nvim/lua/?.lua"
    .. ";/path/to/theme/lua/?.lua"

local theme = require("lush_theme.theme_name") -- depends on your theme
                                               -- dir structure

local extracted = {
  bg = theme.Normal.bg, -- depending on use, you may need .hex
  fg = theme.Normal.fg, -- but generally it should be coerced for you.
  -- ... etc
}

f…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rktjmp
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #55 on July 21, 2021 03:20.