To modify colors and appearance of text, markers, or indicators in the editor and Output/Console panels, you can use these commands and apply them as described in the configuration section and as shown in user-sample.lua.

Example

The following configuration will set text background to be light red: styles.text = {bg = {250,200,200}}.

Style attributes

  • fg: foreground; a table with three color components {red,green,blue} (0-255)
  • bg: background; a table with three color components {red,green,blue} (0-255)
  • alpha: translucency; 0-255 (0 - transparent, 255 - opaque, 256 - opaque/faster)
  • sel: color of the selected block (only applies to folds); {red,green,blue} (0-255)
  • u: underline; boolean value
  • b: bold; boolean value
  • i: italic; boolean value
  • fill: fill to the end of line; boolean value
  • fn: font face name; string (“Lucida Console”)
  • fs: font size; number (11)

Style elements

See style.lua for the complete list of elements and tomorrow.lua for an example of how these elements can be used.

Note that while many of the colors are configurable, some of the colors (the color of the status bar, the toolbar background, and the borders between panels) are controlled by the OS color scheme.

(v0.50+) alpha attribute is supported for sel, seladd, and caretlinebg style elements.

Indicators

(v0.38+) Indicators add visual elements to the text in the editor, for example, a dotted underline for local variables or a solid line for global ones.

  • styles.indicator.fncall: function call
  • styles.indicator.varlocal: local variable
  • styles.indicator.varglobal: global variable
  • styles.indicator.varmasking: masking variable – a local variable masking another variable in the same block
  • styles.indicator.varmasked: masked variable – a local variable being masked by another variable in the same block
  • styles.indicator.varself: implicit self variable used in functions defined with colon syntax (v1.61+)

You can change the color of an indicator (by setting its fg property), its type (by setting its st property) or disable it by setting its value to nil:

  • styles.indicator.fncall = {st = wxstc.wxSTC_INDIC_PLAIN, fg = {240,0,0}}: set color and type
  • styles.indicator.fncall = {fg = {240,0,0}}: set color
  • styles.indicator.fncall = nil: disable the indicator

If you want to disable an indicator, set its value to nil: styles.indicator.varlocal = nil. If you want to disable all indicators, use styles.indicator = {}.

Indicator types

The following list shows possible indicator types:

  • wxstc.wxSTC_INDIC_DOTS: Dotted underline
  • wxstc.wxSTC_INDIC_PLAIN: Single-line underline
  • wxstc.wxSTC_INDIC_TT: Line of T-shapes
  • wxstc.wxSTC_INDIC_STRIKE: Strike-out
  • wxstc.wxSTC_INDIC_SQUIGGLE: Squiggly underline
  • wxstc.wxSTC_INDIC_SQUIGGLELOW: Squiggly underline (2 pixels)
  • wxstc.wxSTC_INDIC_SQUIGGLEPIXMAP: Similar to INDIC_SQUIGGLE, but draws a pixmap instead of a series of line segments for performance (v1.40+)
  • wxstc.wxSTC_INDIC_BOX: Box
  • wxstc.wxSTC_INDIC_ROUNDBOX: Rounded Box
  • wxstc.wxSTC_INDIC_STRAIGHTBOX: Box with trasparency
  • wxstc.wxSTC_INDIC_DOTBOX: Dotted rectangle
  • wxstc.wxSTC_INDIC_FULLBOX: Rectangle around the text using translucent drawing similar to INDIC_STRAIGHTBOX but covering the entire character area (v1.40+)
  • wxstc.wxSTC_INDIC_DASH: Dashed underline
  • wxstc.wxSTC_INDIC_DIAGONAL: Diagonal hatching
  • wxstc.wxSTC_INDIC_TEXTFORE: Changes the colour of the text (v1.40+)
  • wxstc.wxSTC_INDIC_HIDDEN: No visual effect

See Scintilla documentation for indicator style examples.

Color schemes

Color schemes allow configuring colors and attributes in coordinated set. See tomorrow.lua for an example of how these colors and attributes can be manipulated, scheme-picker.lua for how they can be used, and user-sample.lua for how a color scheme can be configured.

what a breath of fresh air. (doctorbling)

IMHO, ZBS is the fastest, most-flexible, best-thought-out IDE AND Debugger I've used since I began coding professionally in 1980. (Michael Berlyn)

Love ZeroBrane Studio. Lightweight. Works. Powerful. (Ross Berteig)

Love the debugger, saving my life. (Troy Sandal)

Thanks again for your awesome IDE. I've moved over to it, forsaking my previous investment in Decoda! (Stephen Nichols)

my kids love ZeroBrane. (Phil Hagelberg)

ZBS is beautiful experience. I am using it usually 10 hrs every day w/o problems. (Srdjan Markovic)

...heartily recommend it. (stun)

I love ZBS. I use it for all of the work I’ve started doing in Lua...! This IDE is fantastic! (Eddie Dover)

ZeroBrane Studio has got a working debugger, full IDE feature set, small footprint, and is completely customizable in lua. You have no idea how excited I was to find this little gem! (Jonathan Shieh)

It's a joy to use;... totally rock solid. (Jeff Smith)

Complaining about Zerobrane is like complaining that a beautiful spring day is a couple degrees too warm. (Jim Burnes)