| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- -- Everforest Dark Theme for Lumacs
- -- Defined in Lua using the theme API
- local theme = editor:create_and_register_theme("everforest-dark")
- -- Everforest color palette
- local bg0 = lumacs.Color(45, 49, 48) -- #2d3139
- local bg1 = lumacs.Color(52, 56, 56) -- #343839
- local fg = lumacs.Color(211, 198, 170) -- #d3c6aa
- local red = lumacs.Color(230, 126, 128) -- #e67e80
- local orange = lumacs.Color(230, 152, 117) -- #e69875
- local yellow = lumacs.Color(219, 188, 127) -- #dbbc7f
- local green = lumacs.Color(167, 192, 128) -- #a7c080
- local cyan = lumacs.Color(131, 192, 146) -- #83c092
- local blue = lumacs.Color(125, 174, 163) -- #7fbbb3
- local purple = lumacs.Color(208, 135, 162) -- #d699b5
- local grey = lumacs.Color(146, 131, 116) -- #928374
- -- Text elements
- theme:set_color(lumacs.ThemeElement.Normal, fg, bg0)
- theme:set_color(lumacs.ThemeElement.String, green, bg0)
- theme:set_color(lumacs.ThemeElement.Function, blue, bg0)
- theme:set_color(lumacs.ThemeElement.Type, yellow, bg0)
- theme:set_color(lumacs.ThemeElement.Number, purple, bg0)
- theme:set_color(lumacs.ThemeElement.Constant, orange, bg0)
- theme:set_color(lumacs.ThemeElement.Error, lumacs.Color(255, 255, 255), red)
- -- Rich faces (Bold/Italic)
- local keyword_attrs = lumacs.FaceAttributes()
- keyword_attrs.foreground = red
- keyword_attrs.background = bg0
- keyword_attrs.weight = lumacs.FontWeight.Bold
- theme:set_face("font-lock-keyword-face", keyword_attrs)
- local comment_attrs = lumacs.FaceAttributes()
- comment_attrs.foreground = grey
- comment_attrs.background = bg0
- comment_attrs.slant = lumacs.FontSlant.Italic
- theme:set_face("font-lock-comment-face", comment_attrs)
- -- UI elements
- theme:set_color(lumacs.ThemeElement.StatusLine, bg0, fg)
- theme:set_color(lumacs.ThemeElement.StatusLineInactive, grey, bg1)
- theme:set_color(lumacs.ThemeElement.MessageLine, fg, bg0)
- theme:set_color(lumacs.ThemeElement.LineNumber, grey, bg0)
- theme:set_color(lumacs.ThemeElement.Cursor, bg0, fg)
- theme:set_color(lumacs.ThemeElement.Selection, lumacs.Color(255, 255, 255), blue)
- theme:set_color(lumacs.ThemeElement.SearchMatch, bg0, yellow)
- theme:set_color(lumacs.ThemeElement.SearchFail, lumacs.Color(255, 255, 255), red)
- -- Window elements
- theme:set_color(lumacs.ThemeElement.WindowBorder, grey, bg0)
- theme:set_color(lumacs.ThemeElement.WindowBorderActive, cyan, bg0)
- theme:set_color(lumacs.ThemeElement.Background, fg, bg0)
- print(string.format("Theme '%s' loaded.", theme:name()))
|