By josh / May 20, 2014

Taking the mystery out of creating your own Sublime Text color scheme

Everybody loves a good color scheme.

Whenever I tweet about a new color scheme someone has cooked up, it gets tons of attention.

If you’ve ever taken a peek at a Sublime color scheme file, though, or summoned the courage to try to make some changes, you know it’s not easy to customize the way Sublime highlights code.

Color scheme files are aren’t very intuitive to work with. They’re XML, for starters. ‘Nuff said on that …

Then you have to figure out just the right scope to use for each part of your theme. Scopes are similar to CSS selectors–they’re how Sublime applies colors to different parts of a programming language, like keywords, variable names and comments.

If you want to create your own color scheme, there’s a relatively unknown plugin that makes a lot of this easier.

It’s called ColorSchemeEditor, and it’s available in Package Control for both Sublime Text 2 and Sublime Text 3.

When you run ColorSchemeEditor, it opens the file for the active color scheme. You can then open some source code–say a JavaScript file–and insert the cursor in different source elements. When you select a function name, the plugin will show you which XML element determines what a function name should look like. You can make changes right there, then just save the file and watch Sublime update the appearance of your source code immediately.

Try it out!

For info on more great plugins like this, check out the free Sublime Text Tips newsletter:

http://sublimetexttips.com/newsletter

About the author

josh

3comments
Mr - February 18, 2016

Will ColorSchemeEditor allow me to change color and width of the active indent guide?

“indent_guide_options”: [ “draw_normal”, “draw_active” ],

Reply
Mr - February 18, 2016

Forgot to say, thanks for sharing about ColorSchemeEditor. I’m going to try it out.

Reply
Mr - March 25, 2016

Will ColorSchemeEditor allow me to change color and width of the active indent guide?

“indent_guide_options”: [ “draw_normal”, “draw_active” ],

Reply
Click here to add a comment

Leave a comment: