everforest-dark.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. -- Everforest Dark Theme for Lumacs
  2. -- Defined in Lua using the theme API
  3. local theme = editor:create_and_register_theme("everforest-dark")
  4. -- Everforest color palette
  5. local bg0 = lumacs.Color(45, 49, 48) -- #2d3139
  6. local bg1 = lumacs.Color(52, 56, 56) -- #343839
  7. local fg = lumacs.Color(211, 198, 170) -- #d3c6aa
  8. local red = lumacs.Color(230, 126, 128) -- #e67e80
  9. local orange = lumacs.Color(230, 152, 117) -- #e69875
  10. local yellow = lumacs.Color(219, 188, 127) -- #dbbc7f
  11. local green = lumacs.Color(167, 192, 128) -- #a7c080
  12. local cyan = lumacs.Color(131, 192, 146) -- #83c092
  13. local blue = lumacs.Color(125, 174, 163) -- #7fbbb3
  14. local purple = lumacs.Color(208, 135, 162) -- #d699b5
  15. local grey = lumacs.Color(146, 131, 116) -- #928374
  16. -- Text elements
  17. theme:set_color(lumacs.ThemeElement.Normal, fg, bg0)
  18. theme:set_color(lumacs.ThemeElement.String, green, bg0)
  19. theme:set_color(lumacs.ThemeElement.Function, blue, bg0)
  20. theme:set_color(lumacs.ThemeElement.Type, yellow, bg0)
  21. theme:set_color(lumacs.ThemeElement.Number, purple, bg0)
  22. theme:set_color(lumacs.ThemeElement.Constant, orange, bg0)
  23. theme:set_color(lumacs.ThemeElement.Error, lumacs.Color(255, 255, 255), red)
  24. -- Rich faces (Bold/Italic)
  25. local keyword_attrs = lumacs.FaceAttributes()
  26. keyword_attrs.foreground = red
  27. keyword_attrs.background = bg0
  28. keyword_attrs.weight = lumacs.FontWeight.Bold
  29. theme:set_face("font-lock-keyword-face", keyword_attrs)
  30. local comment_attrs = lumacs.FaceAttributes()
  31. comment_attrs.foreground = grey
  32. comment_attrs.background = bg0
  33. comment_attrs.slant = lumacs.FontSlant.Italic
  34. theme:set_face("font-lock-comment-face", comment_attrs)
  35. -- UI elements
  36. theme:set_color(lumacs.ThemeElement.StatusLine, bg0, fg)
  37. theme:set_color(lumacs.ThemeElement.StatusLineInactive, grey, bg1)
  38. theme:set_color(lumacs.ThemeElement.MessageLine, fg, bg0)
  39. theme:set_color(lumacs.ThemeElement.LineNumber, grey, bg0)
  40. theme:set_color(lumacs.ThemeElement.Cursor, bg0, fg)
  41. theme:set_color(lumacs.ThemeElement.Selection, lumacs.Color(255, 255, 255), blue)
  42. theme:set_color(lumacs.ThemeElement.SearchMatch, bg0, yellow)
  43. theme:set_color(lumacs.ThemeElement.SearchFail, lumacs.Color(255, 255, 255), red)
  44. -- Window elements
  45. theme:set_color(lumacs.ThemeElement.WindowBorder, grey, bg0)
  46. theme:set_color(lumacs.ThemeElement.WindowBorderActive, cyan, bg0)
  47. theme:set_color(lumacs.ThemeElement.Background, fg, bg0)
  48. print(string.format("Theme '%s' loaded.", theme:name()))