How can I change the default highlight colour in Sublime Text 3? I used to know how find a highlight key in one of the theme files in ST2 but things changed quite on ST3. Are they in the library somewhere? "Preference >> Browse Package" is almost empty.
Highlight selected text Select the text that you want to highlight. Go to Home and select the arrow next to Text Highlight Color. Select the color that you want. Note: Use a light highlight color if you plan to print the document by using a monochrome palette or printer.
🖍 Text Marker (Highlighter) Simply use Alt + Space to mark selected text.
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.
Some developers will prefer a simplistic black on white interface, while others prefer a more colourful interface or a darker theme. Sublime Text 3 has a number of pre-installed themes that can be enabled by clicking on “Preferences” in the top bar, then clicking “Color Scheme”. Click on “Preferences” in the top bar, then click “Color Scheme”.
The highlighting of source code and prose in Sublime Text is controlled by a color scheme. A color scheme assigns colors and font styles to scopes, which are assigned to the text by the syntax.
To use hashed syntax highlighting, the "foreground" key must have a value that is an array of two or more colors. Sublime Text will create 256 different colors that are linear interpolations (lerp) between the colors provided. The interpolation is done in HSL space.
The theme controls such elements as buttons select lists, the sidebar and tabs. Sublime Text color schemes are implemented using .sublime-color-scheme files, containing JSON. Sublime Text also supports a subset of features using the TextMate .tmTheme format. Before Sublime Text 3.1, only the .tmTheme format was supported.
You can see which theme you are using by going to
Preferences>Colour Scheme
and see which one is ticked.
Open the theme file and find the key that says:
<key>selection</key>
Go to a site that shows hex colour codes (like this one http://html-color-codes.com/) and find the code for the colour you want. Then sub your new colour code into the line below the selection key in the theme file, replacing the old hex colour code.
Save the modified theme file and it should work straight away.
EDIT
Install PackageResourceViewer plugin using package control. Open the command palette with ⌘⇧P (for windows/linux CtrlShiftP) and type prv
to get the PackageResourceViewer options. Choose Open Resource >>Theme- YourTheme >> and edit your theme file
Tony Vincent's answer is excellent, and I would also add that if changing the selection color makes the selected text difficult to read, selectionForeground is the key to change. For example:
<key>selectionForeground</key> <string>#000000</string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With