Sublime Forum

ST3: ThemeTweaker

#1

This is something I wrote a while ago. I had written some libraries to deal with applying filters on all elements of a tmTheme file. So this is just a wrapper around those libraries and such. I guess it is useful for if you want to rotate the hues of your color schemes palettes for a bit of a change. Or maybe the sun is coming through a window and you want to darken up the background. Maybe you just want to increase the saturation of theme without modifying the entire theme. Or maybe you just want to goof around with some filters.

Anyways, the plugin takes your current scheme and copies it into “User/ThemeTweaker”, and then applies the filters and sets that as your current theme. This way your files aren’t directly edited, but if you like your changes, you know where the theme file is.

It comes with no keybinding out the box, but you can bind all of your shortcuts with the context “theme_tweaker”, and the shortcuts will on trigger when you are in “Tweak Mode” (Tweak Mode toggle is in the command palette).

Example mappings:
[pre=#141414]
//////////////////////////////////
// Theme Tweaker
//////////////////////////////////
{“keys”: “up”], “command”: “theme_tweaker_brightness”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “+”}},
{“keys”: “down”], “command”: “theme_tweaker_brightness”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “-”}},
// Background only (use “fg” for foreground only)
// {“keys”: “up”], “command”: “theme_tweaker_brightness”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “+”, “context”: “bg”}},
// {“keys”: “down”], “command”: “theme_tweaker_brightness”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “-”, “context”: “bg”}},
{“keys”: “shift+up”], “command”: “theme_tweaker_saturation”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “+”}},
{“keys”: “shift+down”], “command”: “theme_tweaker_saturation”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “-”}},
{“keys”: “shift+left”], “command”: “theme_tweaker_hue”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “-”}},
{“keys”: “shift+right”], “command”: “theme_tweaker_hue”, “context”: {“key”: “theme_tweaker”}], “args”: {“direction”: “+”}},
{“keys”: “ctrl+1”], “command”: “theme_tweaker_invert”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+2”], “command”: “theme_tweaker_colorize”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+3”], “command”: “theme_tweaker_sepia”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+4”], “command”: “theme_tweaker_grayscale”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+5”], “command”: “theme_tweaker_glow”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+z”], “command”: “theme_tweaker_undo”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “ctrl+shift+z”], “command”: “theme_tweaker_redo”, “context”: {“key”: “theme_tweaker”}]},
{“keys”: “escape”], “command”: “theme_tweaker_clear”, “context”: {“key”: “theme_tweaker”}]}
][/pre]

Maybe should have called it SchemeTweaker, but it tweaks the tmTheme files, so it kind of makes sense…

Anyways, not really a productive plugin, just something a little fun, but I have built a theme scheduler plugin that uses it as well, so it does have some usefulness.

repo and info here: github.com/facelessuser/ThemeTweaker

0 Likes

#2

Now on Package Control

0 Likes

#3

This is the last of my color scheme related package updates. ThemeTweaker now supports new .sublime-color-scheme format. Also decreased the default contrast and saturation factor to give better saturation and contrast results.

ThemeTweaker 1.5.0

Oct 21, 2017

  • NEW: New .sublime-color-scheme format support.
  • NEW: Tweaked files are now prefixed with tweak_.
  • FIX: Decreasing saturation and contrast factor to improve adjustment results.
1 Like