forked from facelessuser/ColorHelper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ColorHelperColors.sublime-syntax
42 lines (36 loc) · 1.28 KB
/
ColorHelperColors.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- color-helper-colors
hidden: true
scope: source.colors
contexts:
main:
# Strings begin and end with quotes, and use backslashes as an escape
# character
- match: '([a-zA-Z][a-zA-Z\d]*)(\()(?:\s*)'
captures:
1: support.function.colors
2: punctuation.section.group.begin.colors
- match: '[\[({]'
scope: punctuation.section.group.begin.colors
- match: '(\#)([a-fA-F0-9]{8}|[a-fA-F0-9]{6}|[a-fA-F0-9]{3,4})\b'
captures:
1: punctuation.definition.constant.colors
2: constant.other.color.rgb-value.colors
- match: '[a-zA-Z][-a-zA-Z0-9_]+(?!\()'
scope: support.constant.names.colors
- match: '([+\-])?(?:(?:([0-9]*)(\.)([0-9]+))|([0-9]+))(?:(e[-+]?[0-9]*))?(%|deg|rad|turn|grad)?'
captures:
1: keyword.operator.arithmetic.colors
2: constant.numeric.value.colors
3: punctuation.separator.decimal.colors
4: constant.numeric.value.colors
5: constant.numeric.value.colors
6: constant.numeric.value.colors
7: constant.numeric.suffix.colors
- match: '[,/]'
scope: punctuation.separator.sequence.colors
- match: '[\])}]'
scope: punctuation.section.group.end.colors