Dracula Syntax Highlighting Specification

1Prelude

1.1Interpreting this specification

Language syntaxes and scopes will be referred to in the following manner throughout this document:

ScopeOfInterest
(ForegroundColor,BackgroundColoropt)ItalicoptBoldopt
Note Throughout the document, broad ranges of syntax tokens will be referred to using TextMate Naming Conventions

1.2Color Palette

1.2.1Standard

Background
#282A36
Foreground
#F8F8F2
Selection
#44475A
Comment
#6272A4
Red
#FF5555
Orange
#FFB86C
Yellow
#F1FA8C
Green
#50FA7B
Purple
#BD93F9
Cyan
#8BE9FD
Pink
#FF79C6

1.2.2ANSI

AnsiBlack
#21222C
AnsiRed
#FF5555
AnsiGreen
#50FA7B
AnsiYellow
#F1FA8C
AnsiBlue
#BD93F9
AnsiMagenta
#FF79C6
AnsiCyan
#8BE9FD
AnsiWhite
#F8F8F2
AnsiBrightRed
#FF6E6E

1.3Example spec-compliant theme implementation

A fully spec‐compliant theme implementation can be found by visiting the dracula/visual‐studio‐code repository.

2General

2.1Diffs

2.2Markup (Markdown, RST, etc.)

Note Braces and parens should be the same color as the foreground color of the currently scoped position in the document (e.g. Purple for headings, Foreground for regular text)

3Classes

Note InstanceReservedWords refers to reserved words that the language uses to interact with the instance (e.g. this, self, super).

4Comments

Example
/**
 * @param {string} foo - Some string parameter.
// ^^^^^^ -------------------------------------- Pink
//        ^      ^ ----------------------------- Cyan
//         ^^^^^^ ------------------------------ Cyan Italic
//                 ^^^ ------------------------- Orange Italic
 */

5Constants

6Entities

7Functions/Methods

Decorators
(Green)Italic

8Keywords

9Language Built-ins

Support
(Cyan)Italic

10Punctuation

Note SeparatorsReferencesOrAccessors does not refer to simple object or class dot accessors.

11Serializable / Configuration Languages

YamlAliases
(Green)ItalicUnderline

12Storage

Types
(Cyan)Italic
Note GenericTemplatesAndMappedDeclarations refers to the declarations of generic types only. In the following example, only the T in the brackets would be Orange. function myFunc<T>(x: T): T {}
Note GenericTemplatesAndMappedDeclarations would also color P and T on the LHS and T in the declaration of the following expression.
Example
type PartialExample<T> = { // T = Orange Italic
  [P in keyof T]?: T[P];   // P and T on the LHS = Orange Italic
}

13Strings

14Variables

Destructuring Example
const x = {
    foo: 'foo',
    bar: 'bar',
    baz: 'baz',
};

// foo = Orange Italic
// myFoo = Foreground
const { foo: myFoo } = x;
Import/Export Example
export { Foo };                     // Foo = Foreground
export { Foo as myFoo };            // Foo = Orange Italic, myFoo = Foreground
import { Foo as myFoo } from 'foo'; // Foo = Orange Italic, myFoo = Foreground
import { Foo } from 'foo';          // Foo = Foreground

§Index

  1. AnsiBlack
  2. AnsiBlue
  3. AnsiBrightBlack
  4. AnsiBrightBlue
  5. AnsiBrightCyan
  6. AnsiBrightGreen
  7. AnsiBrightMagenta
  8. AnsiBrightRed
  9. AnsiBrightWhite
  10. AnsiBrightYellow
  11. AnsiCyan
  12. AnsiGreen
  13. AnsiMagenta
  14. AnsiRed
  15. AnsiWhite
  16. AnsiYellow
  17. Background
  18. BracketsParensBraces
  19. BuiltInFunctions
  20. BuiltInMagicMethodsOrConstants
  21. ClassName
  22. Comment
  23. Constant
  24. ConstantEscapeSequences
  25. CssParentSelectors
  26. Cyan
  27. DateTime
  28. Decorators
  29. Deprecated
  30. DestructureingAliasRHS
  31. DestructuringAliasLHS
  32. DiffChanged
  33. DiffDeleted
  34. DiffHeader
  35. DiffInserted
  36. DiffText
  37. DocCommentKeywords
  38. DocCommentParameters
  39. DocCommentTypes
  40. Error
  41. Foreground
  42. FunctionNames
  43. FunctionParameters
  44. GenericTemplatesAndMappedDeclarations
  45. Green
  46. HtmlCssAttributeNames
  47. HtmlTags
  48. InheritedClassName
  49. InstanceReservedWords
  50. Invalid
  51. Keys
  52. Keyword
  53. KeywordGenericCssSelector
  54. KeywordNew
  55. MarkupBlockquote
  56. MarkupBold
  57. MarkupCodeBlockWithoutSyntax
  58. MarkupHeading
  59. MarkupHorizontalRule
  60. MarkupInlineCode
  61. MarkupItalic
  62. MarkupLinkText
  63. MarkupLinkUrl
  64. MarkupListBulletOrNumber
  65. MarkupRSTConstants
  66. Modifiers
  67. ObjectKeys
  68. Orange
  69. Pink
  70. Purple
  71. Red
  72. ScopeOfInterest
  73. Selection
  74. SeparatorsReferencesOrAccessors
  75. Storage
  76. String
  77. StringInterpolationOperators
  78. StringRegExp
  79. Support
  80. Types
  81. Variable
  82. YamlAliases
  83. Yellow
  1. 1Prelude
    1. 1.1Interpreting this specification
    2. 1.2Color Palette
      1. 1.2.1Standard
      2. 1.2.2ANSI
    3. 1.3Example spec-compliant theme implementation
  2. 2General
    1. 2.1Diffs
    2. 2.2Markup (Markdown, RST, etc.)
  3. 3Classes
  4. 4Comments
  5. 5Constants
  6. 6Entities
  7. 7Functions/Methods
  8. 8Keywords
  9. 9Language Built-ins
  10. 10Punctuation
  11. 11Serializable / Configuration Languages
  12. 12Storage
  13. 13Strings
  14. 14Variables
  15. §Index