0 comment(s).

Chapter 8. Themes

Amy Editor contains easy language for creating new themes. The editor supplies with about a dozen of predefined themes already, and it's not terribly difficult to add new ones. As many other definition, themes are stored using YAML format in the following manner:

signature:
  name: 'Black'
  author: 'Petr Krontorád, April-Child.com'

definition:
  cssId: 'black'
  background: '#111'
  textColor: '#fff'
  caretColor: '#fff'
  caretRowStyleActive: '#444'
  selectionStyle: '#283a76'
  TOKEN_MULTIROW_COMMENT: 'color:#888'
  TOKEN_SINGLEROW_COMMENT: 'color:#888'
  TOKEN_SINGLE_QUOTED: 'color:#8399D3'
  TOKEN_DOUBLE_QUOTED: 'color:#8399D3'
  CHUNK_KEYWORD: 'color:#66f'
  CHUNK_NUMBER: 'color:#ff0'
  CHUNK_OPERATOR: 'color:#7FC7EC;'
  CHUNK_PARENTHESIS: 'font-weight:bold'
  CHUNK_KEYWORD_CUSTOM: 'color:#C9C900'
  CHUNK_FUNCTION_NAME: 'color:#DD3D2A'
  CHUNK_LIBRARY: 'color:#08f'
  CHUNK_LIBRARY_CUSTOM: 'color:#CC581D'

As you can see, after signature section you are simply required to fill styles (in a way CSS styles work) for each different type of editing token, caret, text color etc. The definition example is self-explaining, there's not much to add.