Skip to content

Instantly share code, notes, and snippets.

@dajare
Created December 25, 2023 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dajare/3150e679cf8f22d9b0ea6210ef42f976 to your computer and use it in GitHub Desktop.
Save dajare/3150e679cf8f22d9b0ea6210ef42f976 to your computer and use it in GitHub Desktop.
Embers Light - Base16 theme for Textadept 12*
-- Base16 Theme: Embers Light
-- Embers Light theme adapted for Textadept (http://foicica.com/textadept/)
-- Theme author: Jannik Siebert (https://github.com/janniks)
-- Base16 (https://github.com/chriskempson/base16)
-- Build with Base16 Builder (https://github.com/chriskempson/base16-builder)
-- Repository source: https://github.com/rgieseke/base16-textadept/blob/3c74baf8fedc381b5eb96c82fb96c71df9db34e8/base16-embers-light.lua
local view, colors, styles = view, view.colors, view.styles
-- Base16 colors
colors.base00 = 0xD1D6DB
colors.base01 = 0xAEB6BE
colors.base02 = 0x909AA3
colors.base03 = 0x75808A
colors.base04 = 0x47505A
colors.base05 = 0x323B43
colors.base06 = 0x20262C
colors.base07 = 0x0F1316
colors.base08 = 0x576D82
colors.base09 = 0x578282
colors.base0A = 0x57826D
colors.base0B = 0x6D8257
colors.base0C = 0x826D57
colors.base0D = 0x82576D
colors.base0E = 0x6D5782
colors.base0F = 0x575782
-- Default font.
if not font then font = WIN32 and 'Consolas' or OSX and 'Monaco' or 'Monospace' end
if not size then size = not OSX and 10 or 12 end
-- Predefined styles.
styles[view.STYLE_DEFAULT] = {
font = font, size = size, fore = colors.base05, back = colors.base00
}
styles[view.STYLE_LINENUMBER] = {fore = colors.base03, back = colors.base01}
styles[view.STYLE_BRACELIGHT] = {fore = colors.base0E, bold = true}
styles[view.STYLE_BRACEBAD] = {fore = colors.base08}
-- styles[view.STYLE_CONTROLCHAR] = {}
styles[view.STYLE_INDENTGUIDE] = {fore = colors.base03}
styles[view.STYLE_CALLTIP] = {fore = colors.base04, back = colors.base01}
styles[view.STYLE_FOLDDISPLAYTEXT] = {fore = colors.base01, back = colors.base03}
-- Tag styles.
styles[lexer.ANNOTATION] = {fore = colors.base08}
styles[lexer.ATTRIBUTE] = {fore = colors.base0A}
styles[lexer.BOLD] = {bold = true}
styles[lexer.CLASS] = {fore = colors.base0A}
styles[lexer.CODE] = {eol_filled = true}
styles[lexer.COMMENT] = {fore = colors.base03}
styles[lexer.CONSTANT] = {fore = colors.base09}
-- styles[lexer.CONSTANT_BUILTIN] = {}
styles[lexer.EMBEDDED] = {fore = colors.base0F, back = colors.base01}
styles[lexer.ERROR] = {fore = colors.base08}
-- styles[lexer.FUNCTION] = {}
styles[lexer.FUNCTION_BUILTIN] = {fore = colors.base0D}
-- styles[lexer.FUNCTION_METHOD] = {}
styles[lexer.HEADING] = {bold = true}
-- styles[lexer.IDENTIFIER] = {}
styles[lexer.ITALIC] = {italic = true}
styles[lexer.KEYWORD] = {fore = colors.base0E}
styles[lexer.LABEL] = {fore = colors.base08}
styles[lexer.LINK] = {underline = true}
-- styles[lexer.LIST] = {}
styles[lexer.NUMBER] = {fore = colors.base09}
styles[lexer.OPERATOR] = {fore = colors.base05}
styles[lexer.PREPROCESSOR] = {fore = colors.base0B}
styles[lexer.REFERENCE] = {underline = true}
styles[lexer.REGEX] = {fore = colors.base0C}
styles[lexer.STRING] = {fore = colors.base0B}
styles[lexer.TAG] = {}
styles[lexer.TYPE] = {fore = colors.base0A}
styles[lexer.UNDERLINE] = {underline = true}
-- styles[lexer.VARIABLE] = {}
styles[lexer.VARIABLE_BUILTIN] = {fore = colors.base08}
-- styles[lexer.WHITESPACE] = {}
-- CSS.
styles.property = styles[lexer.ATTRIBUTE]
-- styles.pseudoclass = {}
-- styles.pseudoelement = {}
-- Diff.
styles.addition = {fore = colors.base0B}
styles.deletion = {fore = colors.base08}
styles.change = {fore = colors.base0E}
-- HTML.
styles.tag_unknown = styles.tag .. {italic = true}
styles.attribute_unknown = styles.attribute .. {italic = true}
-- Latex, TeX, and Texinfo.
styles.command = styles[lexer.KEYWORD]
styles.command_section = styles[lexer.HEADING]
styles.environment = styles[lexer.TYPE]
styles.environment_math = styles[lexer.NUMBER]
-- Makefile.
-- styles.target = {}
-- Markdown.
-- styles.hr = {}
-- Python.
styles.keyword_soft = {}
-- XML.
-- styles.cdata = {}
-- YAML.
styles.error_indent = {back = colors.base08}
-- Element colors.
-- view.element_color[view.ELEMENT_SELECTION_TEXT] =
view.element_color[view.ELEMENT_SELECTION_BACK] = colors.base02
-- view.element_color[view.ELEMENT_SELECTION_ADDITIONAL_TEXT] =
view.element_color[view.ELEMENT_SELECTION_ADDITIONAL_BACK] = colors.base03
-- view.element_color[view.ELEMENT_SELECTION_SECONDARY_TEXT] =
view.element_color[view.ELEMENT_SELECTION_SECONDARY_BACK] = colors.base03
-- view.element_color[view.ELEMENT_SELECTION_INACTIVE_TEXT] =
view.element_color[view.ELEMENT_SELECTION_INACTIVE_BACK] = colors.base02
view.element_color[view.ELEMENT_CARET] = colors.base05
-- view.element_color[view.ELEMENT_CARET_ADDITIONAL] =
if view ~= ui.command_entry then
view.element_color[view.ELEMENT_CARET_LINE_BACK] = colors.base03 | 0x60000000
end
view.caret_line_layer = view.LAYER_UNDER_TEXT
-- Fold Margin.
view:set_fold_margin_color(true, colors.base00)
view:set_fold_margin_hi_color(true, colors.base00)
-- Markers.
-- view.marker_fore[textadept.bookmarks.MARK_BOOKMARK] = colors.base01
view.marker_back[textadept.bookmarks.MARK_BOOKMARK] = colors.base0D
-- view.marker_fore[textadept.run.MARK_WARNING] =
view.marker_back[textadept.run.MARK_WARNING] = colors.base0E
-- view.marker_fore[textadept.run.MARK_ERROR] =
view.marker_back[textadept.run.MARK_ERROR] = colors.base08
for i = buffer.MARKNUM_FOLDEREND, buffer.MARKNUM_FOLDEROPEN do -- fold margin
view.marker_fore[i] = colors.base00
view.marker_back[i] = colors.base02
view.marker_back_selected[i] = colors.base03
end
-- Indicators.
view.indic_fore[ui.find.INDIC_FIND] = colors.base0E
view.indic_alpha[ui.find.INDIC_FIND] = 0x80
view.indic_fore[textadept.editing.INDIC_HIGHLIGHT] = colors.base09
view.indic_alpha[textadept.editing.INDIC_HIGHLIGHT] = 0x80
view.indic_fore[textadept.snippets.INDIC_PLACEHOLDER] = colors.base03
view.indic_fore[textadept.run.INDIC_WARNING] = colors.base0E
view.indic_fore[textadept.run.INDIC_ERROR] = colors.base08
-- Call tips.
view.call_tip_fore_hlt = colors.base06
-- Long Lines.
view.edge_color = colors.base02
-- Find & replace pane entries.
ui.find.entry_font = font .. ' ' .. size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment