1-- Copyright 2007-2021 Mitchell. See LICENSE. 2-- Light theme for Textadept. 3-- Contributions by Ana Balan. 4 5local view, colors, styles = view, lexer.colors, lexer.styles 6 7-- Greyscale colors. 8colors.dark_black = 0x000000 9colors.black = 0x1A1A1A 10colors.light_black = 0x333333 11colors.grey_black = 0x4D4D4D 12colors.dark_grey = 0x666666 13colors.grey = 0x808080 14colors.light_grey = 0x999999 15colors.grey_white = 0xB3B3B3 16colors.dark_white = 0xCCCCCC 17colors.white = 0xE6E6E6 18colors.light_white = 0xFFFFFF 19 20-- Dark colors. 21colors.dark_red = 0x1A1A66 22colors.dark_yellow = 0x1A6666 23colors.dark_green = 0x1A661A 24colors.dark_teal = 0x66661A 25colors.dark_purple = 0x661A66 26colors.dark_orange = 0x1A66B3 27colors.dark_pink = 0x6666B3 28colors.dark_lavender = 0xB36666 29colors.dark_blue = 0xB3661A 30 31-- Normal colors. 32colors.red = 0x4D4D99 33colors.yellow = 0x4D9999 34colors.green = 0x4D994D 35colors.teal = 0x99994D 36colors.purple = 0x994D99 37colors.orange = 0x4D99E6 38colors.pink = 0x9999E6 39colors.lavender = 0xE69999 40colors.blue = 0xE6994D 41 42-- Light colors. 43colors.light_red = 0x8080CC 44colors.light_yellow = 0x80CCCC 45colors.light_green = 0x80CC80 46colors.light_teal = 0xCCCC80 47colors.light_purple = 0xCC80CC 48colors.light_orange = 0x80CCFF 49colors.light_pink = 0xCCCCFF 50colors.light_lavender = 0xFFCCCC 51colors.light_blue = 0xFFCC80 52 53-- Default font. 54if not font then 55 font = WIN32 and 'Courier New' or OSX and 'Monaco' or 56 'Bitstream Vera Sans Mono' 57end 58if not size then size = not OSX and 10 or 12 end 59 60-- Predefined styles. 61styles.default = { 62 font = font, size = size, fore = colors.light_black, back = colors.white 63} 64styles.line_number = {fore = colors.grey, back = colors.white} 65--styles.control_char = {} 66styles.indent_guide = {fore = colors.dark_white} 67styles.call_tip = {fore = colors.light_black, back = colors.dark_white} 68styles.fold_display_text = {fore = colors.grey} 69 70-- Token styles. 71styles.class = {fore = colors.yellow} 72styles.comment = {fore = colors.grey} 73styles.constant = {fore = colors.red} 74styles.embedded = {fore = colors.dark_blue, back = colors.dark_white} 75styles.error = {fore = colors.red, italics = true} 76styles['function'] = {fore = colors.dark_orange} 77styles.identifier = {} 78styles.keyword = {fore = colors.dark_blue} 79styles.label = {fore = colors.dark_orange} 80styles.number = {fore = colors.teal} 81styles.operator = {fore = colors.purple} 82styles.preprocessor = {fore = colors.dark_yellow} 83styles.regex = {fore = colors.dark_green} 84styles.string = {fore = colors.green} 85styles.type = {fore = colors.lavender} 86styles.variable = {fore = colors.dark_lavender} 87styles.whitespace = {} 88 89-- Multiple Selection and Virtual Space 90--view.additional_sel_alpha = 91--view.additional_sel_fore = 92--view.additional_sel_back = 93--view.additional_caret_fore = 94 95-- Caret and Selection Styles. 96view:set_sel_fore(true, colors.light_black) 97view:set_sel_back(true, colors.light_grey) 98--view.sel_alpha = 99view.caret_fore = colors.grey_black 100view.caret_line_back = colors.dark_white 101--view.caret_line_back_alpha = 102 103-- Fold Margin. 104view:set_fold_margin_color(true, colors.white) 105view:set_fold_margin_hi_color(true, colors.white) 106 107-- Markers. 108--view.marker_fore[textadept.bookmarks.MARK_BOOKMARK] = colors.white 109view.marker_back[textadept.bookmarks.MARK_BOOKMARK] = colors.dark_blue 110--view.marker_fore[textadept.run.MARK_WARNING] = colors.white 111view.marker_back[textadept.run.MARK_WARNING] = colors.light_yellow 112--view.marker_fore[textadept.run.MARK_ERROR] = colors.white 113view.marker_back[textadept.run.MARK_ERROR] = colors.light_red 114for i = buffer.MARKNUM_FOLDEREND, buffer.MARKNUM_FOLDEROPEN do -- fold margin 115 view.marker_fore[i] = colors.white 116 view.marker_back[i] = colors.grey 117 view.marker_back_selected[i] = colors.grey_black 118end 119 120-- Indicators. 121view.indic_fore[ui.find.INDIC_FIND] = colors.yellow 122view.indic_alpha[ui.find.INDIC_FIND] = 128 123view.indic_fore[textadept.editing.INDIC_BRACEMATCH] = colors.grey 124view.indic_fore[textadept.editing.INDIC_HIGHLIGHT] = colors.orange 125view.indic_alpha[textadept.editing.INDIC_HIGHLIGHT] = 128 126view.indic_fore[textadept.snippets.INDIC_PLACEHOLDER] = colors.grey_black 127 128-- Call tips. 129view.call_tip_fore_hlt = colors.light_blue 130 131-- Long Lines. 132view.edge_color = colors.grey 133