61

My questions are:

  • How do I change the overall colors (background and font)?
  • How do I change the colors based on the file type that is open?

Do I need to learn how to create a whole theme?

I read this answer -- Sublime 2 -changing background color based on file type? -- for Sublime 2, but I'm using Sublime 3 (currently in beta), and there is no "Color Scheme - Default" in the Package folder.

Community
  • 1
  • 1
Luke
  • 18,811
  • 16
  • 99
  • 115
  • Sublime Text 3 works the same way as version 2. The path to the tmTheme file should be in your user settings file, rooted at the data folder. http://docs.sublimetext.info/en/latest/reference/settings.html#visual-settings – Jeremy Halliwell Dec 09 '14 at 09:35
  • 1
    In AppData/Roaming, the `Packages` folder for ST3 and ST2 are different; ST3 begins with only a `User` folder. Thank you for the reference link, but it doesn't explain how to make a theme or how to make it change themes per file type. – Luke Dec 09 '14 at 16:08
  • What path does your preferences.sublime-settings file show for "color_scheme"? Go to Preferences > Settings - User in the menu. The previous question you linked to has an explanation of how to edit your theme per file type and it's the same for ST3, you just need to find your tmTheme file! It should be somewhere in your [data directory](http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/basic_concepts.html#the-data-directory). – Jeremy Halliwell Dec 09 '14 at 18:54
  • [This extension](https://github.com/bobef/ColorSchemeEditor) makes editing your tmTheme file much easier btw. – Jeremy Halliwell Dec 09 '14 at 19:01
  • Did you sort your issue with this in the end? – QuantumTiger Nov 22 '15 at 16:39
  • lol why would I expect the solution to be any less complicated. To just change the background color... OML – cbmtrx Dec 31 '21 at 18:41

7 Answers7

42

For How do I change the overall colors (background and font)?

For MAC : goto Sublime text -> Preferences -> color scheme

Abhitesh khatri
  • 2,911
  • 3
  • 20
  • 29
  • 54
    Doesn't help at all. where do I `set` the color itself? I have `RGB` color I want to use. – vsync Jun 08 '17 at 09:41
  • exactly, this just opens a code, the whole UX of this software is bad, intended to look sophisticated but you can't even change a background. The code btw is not even editable. So what we suppose to do with it ? – gotiredofcoding Oct 31 '22 at 07:23
10
  1. Go to the preferences
  2. Click on color scheme
  3. Choose your color scheme
  4. I chose plastic, for my case.
Unheilig
  • 16,196
  • 193
  • 68
  • 98
amruta
  • 109
  • 1
  • 2
8

This question -- Why do Sublime Text 3 Themes not affect the sidebar? -- helped me out.

The steps I followed:

  1. Preferences
  2. Browse Packages...
  3. Go into the User folder (equivalent to going to %AppData%\Sublime Text 3\Packages\User)
  4. Make a new text file in this folder called Default.sublime-theme
  5. Add JSON styles here -- for a template, check out https://gist.github.com/MrDrews/5434948
Community
  • 1
  • 1
Luke
  • 18,811
  • 16
  • 99
  • 115
7

I had the same issue. Sublime3 no longer shows all of the installed packages when you choose Show Packages from the Preferences Menu.

To customise a colour scheme do the following (UNIX):

  • Locate your SublimeText packages directory under the directory which SublimeText is installed in (in my setup this was /opt/sublime/Packages)
  • Open "Color Scheme - Default.sublime-package"
  • Choose the colour scheme which is closest to your requirements and copy it
  • From Sublime Text choose Preferences - Browse Packages - User
  • Paste the colour scheme you copied earlier here and rename it. It should now show up on your "Preferences - Color Scheme" menu under "User"
  • Follow the instructions at the link you previously mentioned to make the changes you require (Sublime 2 -changing background color based on file type?)

--- EDIT ---

For Mac OS X the themes are stored in zipped files so although the preferences file shows them as being in Packages/Color Scheme - Default/ they don't appear in that directory unless you extract them.

  • They can be extracted using the Package Resource Viewer (See this answer for how to install and use the Package Resource Viewer).
  • Search for Color Scheme in the Package Extractor (should give options for Color Scheme Default and Color Scheme legacy)
  • Extract the one you want. It will now be available at users/UserName/Library/Application Support/Sublime Text 3/Packages/Color Scheme - Default (or Legacy)
  • Make a copy of the scheme you want to modify, edit as needed and save it
  • Add or change the line in user preferences which points to the color scheme

for example

"color_scheme": "Packages/Color Scheme - Legacy/myTheme.tmTheme"
QuantumTiger
  • 970
  • 1
  • 10
  • 22
  • My color file on Ubuntu 19.04 is located in a compressed file: `"/snap/sublime-text/69/opt/sublime_text/Packages/Color Scheme - Default.sublime-package"` and the color file is called `"Mariana.sublime-color-scheme"` – Steven Almeroth Sep 26 '19 at 22:49
6

To view Theme files for ST3, install PackageResourceViewer via PackageControl.

Then, you can use the Ctrl + Shift + P >> PackageResourceViewer: Open Resource to view theme files.

To edit a specific background color, you need to create a new file in your user packages folder Packages/User/SublimeLinter with the same name as the theme currently applied to your sublime text file.

However, if your theme is a 3rd party theme package installed via package control, you can edit the hex value in that file directly, under background. For example:


<dict>
  <dict>
    <key>background</key>
    <string>#073642</string>
  </dict>
</dict>

Otherwise, if you are trying to modify a native sublime theme, add the following to the new file you create (named the same as the native theme, such as Monokai.sublime-color-scheme) with your color choice


{
  "globals":
  {
      "background": "rgb(5,5,5)"
  }
}

Then, you can open the file you wish the syntax / color to be applied to and then go to Syntax-Specific settings (under Preferences) and add the path of the file to the syntax specific settings file like so:


{
    "color_scheme": "Packages/User/SublimeLinter/Monokai.sublime-color-scheme"
}

Note that if you have installed a theme via package control, it probably has the .tmTheme file extension.

If you are wanting to edit the background color of the sidebar to be darker, go to Preferences > Theme > Adaptive.sublime-theme

This my answer based on my personal experience and info gleaned from the accepted answer on this page, if you'd like more information.

singularity
  • 573
  • 4
  • 15
0

Steps I followed for an overall dark theme including file browser:

  1. Goto Preferences->Theme...
  2. Choose Adaptive.sublime-theme
user299831
  • 437
  • 1
  • 5
  • 15
-1

For your own theme package find and edit it.

Path: Preferences -> Browse Packages -> Theme - default

<dict>
    <key>settings</key>
    <dict>
        <key>background</key>
        <string>#edf2f6</string>
    </dict>
</dict>
japetko
  • 354
  • 4
  • 14