dracula.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. -- Dracula Theme for Lumacs
  2. -- Defined in Lua using the theme API
  3. local theme = editor:create_and_register_theme("dracula")
  4. -- Dracula color palette
  5. local bg = lumacs.Color(40, 42, 54) -- #282a36 - Background
  6. local current_line = lumacs.Color(68, 71, 90) -- #44475a - Current Line
  7. local fg = lumacs.Color(248, 248, 242) -- #f8f8f2 - Foreground
  8. local comment = lumacs.Color(98, 114, 164) -- #6272a4 - Comment
  9. local cyan = lumacs.Color(139, 233, 253) -- #8be9fd - Cyan
  10. local green = lumacs.Color(80, 250, 123) -- #50fa7b - Green
  11. local orange = lumacs.Color(255, 184, 108) -- #ffb86c - Orange
  12. local pink = lumacs.Color(255, 121, 198) -- #ff79c6 - Pink
  13. local purple = lumacs.Color(189, 147, 249) -- #bd93f9 - Purple
  14. local red = lumacs.Color(255, 85, 85) -- #ff5555 - Red
  15. local yellow = lumacs.Color(241, 250, 140) -- #f1fa8c - Yellow
  16. -- Text elements
  17. theme:set_color(lumacs.ThemeElement.Normal, fg, bg)
  18. theme:set_color(lumacs.ThemeElement.Keyword, pink, bg)
  19. theme:set_color(lumacs.ThemeElement.String, yellow, bg)
  20. theme:set_color(lumacs.ThemeElement.Comment, comment, bg)
  21. theme:set_color(lumacs.ThemeElement.Function, green, bg)
  22. theme:set_color(lumacs.ThemeElement.Type, cyan, bg)
  23. theme:set_color(lumacs.ThemeElement.Number, purple, bg)
  24. theme:set_color(lumacs.ThemeElement.Constant, orange, bg)
  25. theme:set_color(lumacs.ThemeElement.Error, fg, red)
  26. -- UI elements
  27. theme:set_color(lumacs.ThemeElement.StatusLine, bg, purple)
  28. theme:set_color(lumacs.ThemeElement.StatusLineInactive, comment, current_line)
  29. theme:set_color(lumacs.ThemeElement.MessageLine, fg, bg)
  30. theme:set_color(lumacs.ThemeElement.LineNumber, comment, bg)
  31. theme:set_color(lumacs.ThemeElement.Cursor, bg, fg)
  32. theme:set_color(lumacs.ThemeElement.Selection, fg, current_line)
  33. theme:set_color(lumacs.ThemeElement.SearchMatch, bg, orange)
  34. theme:set_color(lumacs.ThemeElement.SearchFail, fg, red)
  35. -- Window elements
  36. theme:set_color(lumacs.ThemeElement.WindowBorder, comment, bg)
  37. theme:set_color(lumacs.ThemeElement.WindowBorderActive, pink, bg)
  38. theme:set_color(lumacs.ThemeElement.Background, fg, bg)
  39. print(string.format("Theme '%s' loaded.", theme:name()))