Skip to content

Instantly share code, notes, and snippets.

@rgieseke
Last active April 5, 2020 08:16
Show Gist options
  • Save rgieseke/4fc5024f5447e261ef252e1f5b2cbe31 to your computer and use it in GitHub Desktop.
Save rgieseke/4fc5024f5447e261ef252e1f5b2cbe31 to your computer and use it in GitHub Desktop.
-- Base16 Theme: Brush Trees Dark
-- http://chriskempson.com/projects/base16/
-- Theme author: Abraham White <[email protected]>
-- Template Repository: https://github.com/rgieseke/ta-themes
local buffer = buffer
local property, property_int = buffer.property, buffer.property_int
-- Base16 colors
property['color.base00'] = 0x675848
property['color.base01'] = 0x7A6D5A
property['color.base02'] = 0x8E826D
property['color.base03'] = 0xA19982
property['color.base04'] = 0xB5AF98
property['color.base05'] = 0xC8C5B0
property['color.base06'] = 0xDCDBC9
property['color.base07'] = 0xEFEFE3
property['color.base08'] = 0x8686b3
property['color.base09'] = 0xa2bbd8
property['color.base0A'] = 0x86b3aa
property['color.base0B'] = 0x86b387
property['color.base0C'] = 0xb3b386
property['color.base0D'] = 0xb38c86
property['color.base0E'] = 0xb286b3
property['color.base0F'] = 0x9f9fb3
-- Default font.
property['font'], property['fontsize'] = 'Bitstream Vera Sans Mono', 10
if WIN32 then
property['font'] = 'Courier New'
elseif OSX then
property['font'], property['fontsize'] = 'Monaco', 12
end
-- Predefined styles.
property['style.default'] = 'font:$(font),size:$(fontsize),'..
'fore:$(color.base05),back:$(color.base00)'
property['style.linenumber'] = 'fore:$(color.base04),back:$(color.base00)'
--property['style.controlchar'] =
property['style.indentguide'] = 'fore:$(color.base03)'
property['style.calltip'] = 'fore:$(color.base04),back:$(color.base01)'
property['style.folddisplaytext'] = 'fore:$(color.base01)'
-- Token styles.
property['style.class'] = 'fore:$(color.base0A)'
property['style.comment'] = 'fore:$(color.base03)'
property['style.constant'] = 'fore:$(color.base09)'
property['style.embedded'] = '$(style.keyword),back:$(color.base01)'
property['style.error'] = 'fore:$(color.base08),italics'
property['style.function'] = 'fore:$(color.base0D)'
property['style.identifier'] = ''
property['style.keyword'] = 'fore:$(color.base0E)'
property['style.label'] = 'fore:$(color.base08)'
property['style.number'] = 'fore:$(color.base09)'
property['style.operator'] = 'fore:$(color.base05)'
property['style.preprocessor'] = 'fore:$(color.base0B)'
property['style.regex'] = 'fore:$(color.base0C)'
property['style.string'] = 'fore:$(color.base0B)'
property['style.type'] = 'fore:$(color.base0A)'
property['style.variable'] = 'fore:$(color.base08)'
property['style.whitespace'] = ''
-- Multiple Selection and Virtual Space
--buffer.additional_sel_alpha =
--buffer.additional_sel_fore =
--buffer.additional_sel_back =
--buffer.additional_caret_fore =
-- Caret and Selection Styles.
buffer:set_sel_fore(true, property_int['color.base06'])
buffer:set_sel_back(true, property_int['color.base02'])
--buffer.sel_alpha =
buffer.caret_fore = property_int['color.base05']
buffer.caret_line_back = property_int['color.base01']
--buffer.caret_line_back_alpha =
-- Fold Margin.
buffer:set_fold_margin_colour(true, property_int['color.base00'])
buffer:set_fold_margin_hi_colour(true, property_int['color.base00'])
-- Markers.
local MARK_BOOKMARK = textadept.bookmarks.MARK_BOOKMARK
--buffer.marker_fore[MARK_BOOKMARK] = property_int['color.base00']
buffer.marker_back[MARK_BOOKMARK] = property_int['color.base00']
--buffer.marker_fore[textadept.run.MARK_WARNING] = property_int['color.base00']
buffer.marker_back[textadept.run.MARK_WARNING] = property_int['color.base0E']
--buffer.marker_fore[textadept.run.MARK_ERROR] = property_int['color.base00']
buffer.marker_back[textadept.run.MARK_ERROR] = property_int['color.base08']
for i = buffer.MARKNUM_FOLDEREND, buffer.MARKNUM_FOLDEROPEN do -- fold margin
buffer.marker_fore[i] = property_int['color.base00']
buffer.marker_back[i] = property_int['color.base03']
buffer.marker_back_selected[i] = property_int['color.base02']
end
-- Indicators.
buffer.indic_fore[ui.find.INDIC_FIND] = property_int['color.base09']
buffer.indic_alpha[ui.find.INDIC_FIND] = 255
local INDIC_BRACEMATCH = textadept.editing.INDIC_BRACEMATCH
buffer.indic_fore[INDIC_BRACEMATCH] = property_int['color.base06']
local INDIC_HIGHLIGHT = textadept.editing.INDIC_HIGHLIGHT
buffer.indic_fore[INDIC_HIGHLIGHT] = property_int['color.base007']
buffer.indic_alpha[INDIC_HIGHLIGHT] = 255
local INDIC_PLACEHOLDER = textadept.snippets.INDIC_PLACEHOLDER
buffer.indic_fore[INDIC_PLACEHOLDER] = property_int['color.base04']
-- Call tips.
buffer.call_tip_fore_hlt = property_int['color.base0C']
-- Long Lines.
buffer.edge_colour = property_int['color.base04']
-- Add red, green, and yellow for diff lexer.
property['color.red'] = property['color.base08']
property['color.green'] = property['color.base0B']
property['color.yellow'] = property['color.base0E']
-- Base16 Theme: Brush Trees
-- http://chriskempson.com/projects/base16/
-- Theme author: Abraham White <[email protected]>
-- Template Repository: https://github.com/rgieseke/ta-themes
local buffer = buffer
local property, property_int = buffer.property, buffer.property_int
-- Base16 colors
property['color.base00'] = 0xEFEFE3
property['color.base01'] = 0xDCDBC9
property['color.base02'] = 0xC8C5B0
property['color.base03'] = 0xB5AF98
property['color.base04'] = 0xA19982
property['color.base05'] = 0x8E826D
property['color.base06'] = 0x7A6D5A
property['color.base07'] = 0x675848
property['color.base08'] = 0x8686b3
property['color.base09'] = 0xa2bbd8
property['color.base0A'] = 0x86b3aa
property['color.base0B'] = 0x86b387
property['color.base0C'] = 0xb3b386
property['color.base0D'] = 0xb38c86
property['color.base0E'] = 0xb286b3
property['color.base0F'] = 0x9f9fb3
-- Default font.
property['font'], property['fontsize'] = 'Bitstream Vera Sans Mono', 10
if WIN32 then
property['font'] = 'Courier New'
elseif OSX then
property['font'], property['fontsize'] = 'Monaco', 12
end
-- Predefined styles.
property['style.default'] = 'font:$(font),size:$(fontsize),'..
'fore:$(color.base05),back:$(color.base00)'
property['style.linenumber'] = 'fore:$(color.base04),back:$(color.base00)'
--property['style.controlchar'] =
property['style.indentguide'] = 'fore:$(color.base03)'
property['style.calltip'] = 'fore:$(color.base04),back:$(color.base01)'
property['style.folddisplaytext'] = 'fore:$(color.base01)'
-- Token styles.
property['style.class'] = 'fore:$(color.base0A)'
property['style.comment'] = 'fore:$(color.base03)'
property['style.constant'] = 'fore:$(color.base09)'
property['style.embedded'] = '$(style.keyword),back:$(color.base01)'
property['style.error'] = 'fore:$(color.base08),italics'
property['style.function'] = 'fore:$(color.base0D)'
property['style.identifier'] = ''
property['style.keyword'] = 'fore:$(color.base0E)'
property['style.label'] = 'fore:$(color.base08)'
property['style.number'] = 'fore:$(color.base09)'
property['style.operator'] = 'fore:$(color.base05)'
property['style.preprocessor'] = 'fore:$(color.base0B)'
property['style.regex'] = 'fore:$(color.base0C)'
property['style.string'] = 'fore:$(color.base0B)'
property['style.type'] = 'fore:$(color.base0A)'
property['style.variable'] = 'fore:$(color.base08)'
property['style.whitespace'] = ''
-- Multiple Selection and Virtual Space
--buffer.additional_sel_alpha =
--buffer.additional_sel_fore =
--buffer.additional_sel_back =
--buffer.additional_caret_fore =
-- Caret and Selection Styles.
buffer:set_sel_fore(true, property_int['color.base06'])
buffer:set_sel_back(true, property_int['color.base02'])
--buffer.sel_alpha =
buffer.caret_fore = property_int['color.base05']
buffer.caret_line_back = property_int['color.base01']
--buffer.caret_line_back_alpha =
-- Fold Margin.
buffer:set_fold_margin_colour(true, property_int['color.base00'])
buffer:set_fold_margin_hi_colour(true, property_int['color.base00'])
-- Markers.
local MARK_BOOKMARK = textadept.bookmarks.MARK_BOOKMARK
--buffer.marker_fore[MARK_BOOKMARK] = property_int['color.base00']
buffer.marker_back[MARK_BOOKMARK] = property_int['color.base00']
--buffer.marker_fore[textadept.run.MARK_WARNING] = property_int['color.base00']
buffer.marker_back[textadept.run.MARK_WARNING] = property_int['color.base0E']
--buffer.marker_fore[textadept.run.MARK_ERROR] = property_int['color.base00']
buffer.marker_back[textadept.run.MARK_ERROR] = property_int['color.base08']
for i = buffer.MARKNUM_FOLDEREND, buffer.MARKNUM_FOLDEROPEN do -- fold margin
buffer.marker_fore[i] = property_int['color.base00']
buffer.marker_back[i] = property_int['color.base03']
buffer.marker_back_selected[i] = property_int['color.base02']
end
-- Indicators.
buffer.indic_fore[ui.find.INDIC_FIND] = property_int['color.base09']
buffer.indic_alpha[ui.find.INDIC_FIND] = 255
local INDIC_BRACEMATCH = textadept.editing.INDIC_BRACEMATCH
buffer.indic_fore[INDIC_BRACEMATCH] = property_int['color.base06']
local INDIC_HIGHLIGHT = textadept.editing.INDIC_HIGHLIGHT
buffer.indic_fore[INDIC_HIGHLIGHT] = property_int['color.base007']
buffer.indic_alpha[INDIC_HIGHLIGHT] = 255
local INDIC_PLACEHOLDER = textadept.snippets.INDIC_PLACEHOLDER
buffer.indic_fore[INDIC_PLACEHOLDER] = property_int['color.base04']
-- Call tips.
buffer.call_tip_fore_hlt = property_int['color.base0C']
-- Long Lines.
buffer.edge_colour = property_int['color.base04']
-- Add red, green, and yellow for diff lexer.
property['color.red'] = property['color.base08']
property['color.green'] = property['color.base0B']
property['color.yellow'] = property['color.base0E']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment