As @braver mentioned above, you want to refer to the customization section of the color scheme documentation for information on what’s possible w/regards to color scheme customization.
By way of a whirlwind tutorial, in Sublime the syntax
of the file that you’re using (in this case Liquid HTML
, sounds like) assigns one or more scopes
to each part of the file to describe what it is, and your color scheme
has a list of rules that associate a scope
with a visual style.
In your case, you want to change the color of comments, and by convention comments are generally defined by a scope
that starts with comment
and gets more specific from there (comment.line
, comment.block
, comment.block.documentation
, etc). So you want a rule that styles the comment
scope.
Next, the color scheme you’re using is defined by the color_scheme
variable, which as you mentioned above is Mariana.sublime-color-scheme
. So you need to make tweaks to that file to alter the colors that you want.
To get started, use the command palette and execute the command View Package File
; you’ll be prompted with a list of every file in every package, so enter the text mariana color
to filter the list down, and select the file named Color Scheme - Default/Mariana.sublime-color-scheme
to open it.
This command opens the file up read-only, so you can’t modify it directly. If you look through the file, you can see that there’s a section with a list of color variables
for use later in the file, then some globals
that define the global colors for some items, then a list of rules
that tell Sublime what colors to use for each scope
that should be colored.
The first item in the list is the rule for comments, which looks like this by default:
{
"name": "Comment",
"scope": "comment, punctuation.definition.comment",
"foreground": "var(blue6)"
},
So everything with a scope of comment
and a scope of punctuation.definition.comment
is set by default to use the color variable blue6
, which you can see in the variables
section at the top of the file.
To make your modifications, you want to create a file that mimics the structure of this file but contains only the parts that you want to change, then save it as a file with the exact same name, but in your User
package. As soon as you save the file, the change will take effect. What happens here is that multiple resources with the same file name are combined together, and the files from your User
package are always loaded last, so your changes are applied on top of the defaults.
In your case, a minimal file for changing just the comments rule would look like this:
{
"rules":
[
{
"name": "Comment",
"scope": "comment, punctuation.definition.comment",
"foreground": "var(blue6)"
},
]
}
You would enter that content into a file. then save it with the name Mariana.sublime-color-scheme
in your User
package; if you don’t know where that is, use Preferences > Browse Packages...
from the menu to find it.
The above applies a change that has no effect because it’s just the default rule, but you can change that foreground
setting to change the color that’s used. See the documentation for the full list of ways to specify a color here. An example would be "foreground": "#FF00FF"
to make comments magenta.
Other options include adding a background
key to also make the background a different color, and using font_options
to apply either bold
, italic
or bold italic
to the color used in order to get things looking like you want, which is presumably not this:
Note that the sublime-color-scheme
file is of type JSON, so if the file isn’t valid JSON Sublime will throw an error when you save your file; the message will tell you roughly where the problem is so you can make changes, and the syntax highlighting for the file should show you the general error location as well. The JSON used here is slightly more relaxed than the standard, // comments
and trailing commas are allowed.