Skip to content

Instantly share code, notes, and snippets.

@DeeNewcum
Created October 12, 2012 19:03
Show Gist options
  • Save DeeNewcum/3880872 to your computer and use it in GitHub Desktop.
Save DeeNewcum/3880872 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# a script for darkening a Gnome-Terminal pallete
#
# see gconf-editor > apps > gnome-terminal > profiles > (some profile) > palette
#
# you'll also want to paste either the first or last color into the "foreground color" field
use strict;
use warnings;
# paste the existing pallete string in here
my $str = '#000000000000:#666600000000:#27274D4D0303:#626250500000:#1A1A32325252:#3A3A28283D3D:#03034C104D4D:#69696B6B6767:#2A2A2B2B2929:#777714141414:#454571711A1A:#7E7E74742727:#39394F4F6767:#56563F3F5454:#1A1A71717171:#777777777676';
$str =~ s/([0-9a-f]{4})/
sprintf "%04X",
0.5 * hex($1)
# ^^^ change this to modify the darken percentage
/eig;
print $str;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment