65

I am trying to edit some of the syntax colours in Sublime Text 3. I'm using the Solarized (Light) built in colour scheme but I only want to change a few of the colours. Where is the settings file (on a Mac)?

6 Answers 6

74

I have managed to find a solution:

Go to http://tmtheme-editor.herokuapp.com (someone has built a web-based theme editor). Once you have tweaked the colour syntax you can download the themename.tmTheme file. Move that file to /Users/username/Library/Application Support/Sublime Text 3/Packages/ User/ (if you are on a Mac).

Load in the syntax theme from the top menu: Sublime Text > Preferences > Color Scheme > themename.

If you want to tweak you syntax further up can upload the custom theme back in the web-based theme editor and save it out again.

Hope this helps someone else.

2
  • 6
    On Linux I added the new theme by 1. clicking Preferences->Browse Packages to get to folder "Packages", 2. Creating folder "Colorsublime-Themes" (if not already exists) in "Packages", 3. put the new theme (named *.tmTheme) there. The new theme can now be loaded through the top menu as mentioned above.
    – DustByte
    Commented Dec 11, 2014 at 9:46
  • 1
    This web service doesn't work and just seems to hang.
    – Sethen
    Commented Mar 29, 2015 at 17:50
60

I'd recommend using PackageResourceViewer to open the file. You could make your modifications there, and it would save in the proper location to override the built in files. However, I would recommend copying the contents of the file and creating a custom version in your User folder. That way, you can easily move it around and modify it without worrying about the built in color schemes.

The default color scheme files are located in Color Schemes - Default.sublime-package. In ST2, this was extracted to Packages/Color Scheme - Default. PackageResourceViewer will display these folders (as they would normally appear in the Packages folder in ST2. You could navigate to your color scheme from that.

8
  • 2
    Thanks for the feedback - I have installed the package control. However, you said "I would recommend copying the contents of the file and creating a custom version in your User folder" Thats the part where I am stuck, I can't find where the original files are located? Commented Sep 12, 2013 at 8:53
  • 6
    Glad you found a solution, but I'll explain anyways. The default color scheme files are located in Color Schemes - Default.sublime-package. In ST2, this was extracted to Packages/Color Scheme - Default. PackageResourceViewer will display these folders (as they would normally appear in the Packages folder in ST2. You could navigate to your color scheme from that.
    – skuroda
    Commented Sep 13, 2013 at 2:43
  • 13
    Just to be clear for future readers: in ST3 the path is Sublime Text/Contents/MacOS/Packages/Color Scheme - Default.sublime-package (note it's "Scheme" not "Schemes") but using PackageResourceViewer you don't need to know that - you can just Command Palette -> PackageResourceViewer: Open Resource -> Color Scheme - Default -> [the theme you want to get at].
    – henry
    Commented Sep 11, 2014 at 23:21
  • @skuroda You're my hero. I've been searching for an easy way to change my color scheme the whole day but this plugin works best.
    – Ali
    Commented Feb 18, 2015 at 17:34
  • 6
    To be even more clear to future readers: after you open the theme file with PackageResourceViewer, copy its contents into a new file. Edit that file, then save it as a ".tmTheme" file in the "User" directory within the data directory (docs.sublimetext.info/en/latest/…).
    – danblaker
    Commented Apr 22, 2016 at 19:15
8

This should be much easier than it is
I used parts of all the other answers to make this work.

Important notes before you begin:
1. I had used this menu item to select a colour scheme: Sublime Text > Preferences > Color Scheme
2. I chose "Monokai.tmTheme"
3. Therefore the file you need containing the colours is: Monokai.tmTheme
4. You will NOT have easy access to that file yet!!

Overall Steps:
The overall steps I found to work are:
1. Get a copy of the Monokai.tmTheme text file
2. Place it in your "/Users/XXX/Library/Application Support/Sublime Text 3/Packages/User" directory
(replace XXX with your username)
3. Again use this menu: Sublime Text > Preferences > Color Scheme
4. Choose the new entry "Monokai - User"
5. Any changes to your Monokai.tmTheme file will immediately be seen by Sublime Text

Getting the Monokai.tmTheme text file :
This is the tricky part.
You have two options

Option A. Use PackageResourceViewer to open the resource:
A1. Tools -> Command Palette
A2. Type "PackageResourceViewer"
A3. Choose "PackageResourceViewer: Open Resource"
A4. Navigate to "Color Scheme - Default"
A5. Navigate to "Monokai.tmTheme"
A6. This will open the contents of the file but it is NOT a real file on your disk! You must copy the contents into a new text document and save it into "/Users/XXX/Library/Application Support/Sublime Text 3/Packages/User/Monokai.tmTheme" as above

Option B. Use the web app to create your .tmTheme file:
B1. Goto http://tmtheme-editor.herokuapp.com
B2. Edit the colours
B3. Download the .tmTheme file
B4. Put it into "/Users/XXX/Library/Application Support/Sublime Text 3/Packages/User/Monokai.tmTheme" as above

7

Editing is way simpler than advices above.

  1. Go to Sublime installation folder, find there Packages subfolder.
  2. Open Color Scheme - Default.sublime-package as a zip archive (I use Total Commander and Ctrl+PgDn keys).
  3. Find there any scheme you like *.tmTheme, copy to HDD and edit with any XML editor.
  4. Pack modified file back (with Total Commander just copy file to opened archive).
1
  • Changing the files that Sublime Text installs is not a good idea. You can instead place an override version in your "/Users/XXX/Library/Application Support/Sublime Text 3/Packages/User" directory. Commented Apr 9, 2018 at 22:06
7

Sublime version, OS & OS version independent way:

In Sublime, at the top menu bar goto "Sublime Text 2/3" -> Preferences -> "Browse Packages...". This will open the "Packages" folder correctlin Finder/FileExplorer/Nautilus/... depending on OS/version-of-OS.

enter image description here

Find your theme and edit away.. enter image description here Source

1
  • 3
    how do I find themes that are pre-installed with Sublime 3 ? I only can find themes I added via package control with this method. I like default theme IDLE, and want to add functionality to show colors for the GitGutter package.. Commented May 5, 2017 at 2:52
3

As of May 2018 using Sublime Text 3:

I followed the Overall Steps and Option A. from @davidfrancis with great success to customize the Mariana color scheme.

However, I had to change the file extension from <name>.tmTheme to <name>.sublime-color-scheme. Also, the filename can be anything you want (don't need to keep the default), and it will appear under Preferences > Color Scheme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.