Skip to content

Instantly share code, notes, and snippets.

@chew-z
Created September 2, 2016 02:26
Show Gist options
  • Save chew-z/cbb61e085c95b6b9cdacd629cce50ac6 to your computer and use it in GitHub Desktop.
Save chew-z/cbb61e085c95b6b9cdacd629cce50ac6 to your computer and use it in GitHub Desktop.
Color converter HEX to term256
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
use Color::ANSI::Util qw(
rgb_to_ansi256
);
say "Throw me hex# and I will throw back ansi 256 color";
while (<>) {
# print $_;
say rgb_to_ansi256($_);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment