Sublime Text 2 中突出显示的颜色表示什么?
What does highlighted colors in Sublime Text 2 signify?
我在文件中有这段代码:
background: -moz-linear-gradient(red, orange, yellow, green, blue, indigo, violet);
Sublime Text 2 似乎用浅蓝色突出了 indigo
和 violet
的背景:
我尝试了更多的颜色,其中大多数颜色如 chocolate
、aliceblue
、pink
等被突出显示,但其他一些颜色如 maroon
、teal
, silver
等没有。
蓝色突出显示是什么意思?
X11 colors [X11COLORS] supported by popular browsers with the addition
of gray/grey variants from SVG 1.0. The resulting list is precisely
the same as the SVG 1.0 color keyword names. This specification
extends their definition beyond SVG.
CSS.tmLanguage的相关部分:
...
<dict>
<key>color-values</key>
<dict>
<key>patterns</key>
<array>
...
<dict>
<key>comment</key>
<string>These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp</string>
<key>match</key>
<string>\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b</string>
<key>name</key>
<string>invalid.deprecated.color.w3c-non-standard-color-name.css</string>
</dict>
...
</array>
</dict>
...
不同的外观是由作用域造成的:
support.constant.color.w3c-standard-color-name.css(对于标准颜色关键字)
invalid.deprecated.color.w3c-non-standard-color-name.css(用于扩展颜色关键字)
我在文件中有这段代码:
background: -moz-linear-gradient(red, orange, yellow, green, blue, indigo, violet);
Sublime Text 2 似乎用浅蓝色突出了 indigo
和 violet
的背景:
我尝试了更多的颜色,其中大多数颜色如 chocolate
、aliceblue
、pink
等被突出显示,但其他一些颜色如 maroon
、teal
, silver
等没有。
蓝色突出显示是什么意思?
X11 colors [X11COLORS] supported by popular browsers with the addition of gray/grey variants from SVG 1.0. The resulting list is precisely the same as the SVG 1.0 color keyword names. This specification extends their definition beyond SVG.
CSS.tmLanguage的相关部分:
...
<dict>
<key>color-values</key>
<dict>
<key>patterns</key>
<array>
...
<dict>
<key>comment</key>
<string>These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp</string>
<key>match</key>
<string>\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b</string>
<key>name</key>
<string>invalid.deprecated.color.w3c-non-standard-color-name.css</string>
</dict>
...
</array>
</dict>
...
不同的外观是由作用域造成的:
support.constant.color.w3c-standard-color-name.css(对于标准颜色关键字)
invalid.deprecated.color.w3c-non-standard-color-name.css(用于扩展颜色关键字)