# # adds /brighten to brighten current colormap and /darken to darken current color map. # this script is useful if you want to consistently brighten/darken a color theme. # # Optionally: # Ctrl+Up - executes /brighten # Ctrl+Down - executes /darken # # `butane (rsmudge@gmail.com) # debug(7); import java.awt.Color; alias brighten { local('$x'); for ($x = 1; $x < 100; $x++) { setMappedColor($x, [[[new Color: getMappedColor($x), true] brighter] getRGB]); } refreshWindow(getActiveWindow()); scrollWindow(getActiveWindow(), 0); # forces the active window to repaint saveColorMap(); } alias darken { local('$x'); for ($x = 1; $x < 100; $x++) { setMappedColor($x, [[[new Color: getMappedColor($x), true] darker] getRGB]); } refreshWindow(getActiveWindow()); scrollWindow(getActiveWindow(), 0); # forces the active window to repaint saveColorMap(); } bind Ctrl+Up { call("/brighten"); } bind Ctrl+Down { call("/darken"); }