| 1 | package Data::Printer::Theme::Solarized; | ||
| 2 | # inspired by Ethan Schoonover's Solarized theme: | ||
| 3 | # http://ethanschoonover.com/solarized | ||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | sub colors { |
|
Subroutine
colors: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 8 | 1 | my %code_for = ( | |
| 9 | base03 => '#1c1c1c', # '#002b36' | ||
| 10 | base02 => '#262626', # '#073642' | ||
| 11 | base01 => '#585858', # '#586e75' | ||
| 12 | base00 => '#626262', # '#657b83' | ||
| 13 | base0 => '#808080', # '#839496' | ||
| 14 | base1 => '#8a8a8a', # '#93a1a1' | ||
| 15 | base2 => '#e4e4e4', # '#eee8d5' | ||
| 16 | base3 => '#ffffd7', # '#fdf6e3' | ||
| 17 | yellow => '#af8700', # '#b58900' | ||
| 18 | orange => '#d75f00', # '#cb4b16' | ||
| 19 | red => '#d70000', # '#dc322f' | ||
| 20 | magenta => '#af005f', # '#d33682' | ||
| 21 | violet => '#5f5faf', # '#6c71c4' | ||
| 22 | blue => '#0087ff', # '#268bd2' | ||
| 23 | cyan => '#00afaf', # '#2aa198' | ||
| 24 | green => '#5f8700', # '#859900' | ||
| 25 | ); | ||
| 26 | |||
| 27 | return { | ||
| 28 | array => $code_for{violet}, # array index numbers | ||
| 29 | number => $code_for{cyan}, # numbers | ||
| 30 | string => $code_for{cyan}, # strings | ||
| 31 | class => $code_for{yellow}, # class names | ||
| 32 | method => $code_for{orange}, # method names | ||
| 33 | undef => $code_for{red}, # the 'undef' value | ||
| 34 | hash => $code_for{green}, # hash keys | ||
| 35 | regex => $code_for{orange}, # regular expressions | ||
| 36 | code => $code_for{base2}, # code references | ||
| 37 | glob => $code_for{blue}, # globs (usually file handles) | ||
| 38 | vstring => $code_for{base1}, # version strings (v5.16.0, etc) | ||
| 39 | lvalue => $code_for{green}, # lvalue label | ||
| 40 | format => $code_for{green}, # format type | ||
| 41 | true => $code_for{blue}, # boolean type (true) | ||
| 42 | false => $code_for{blue}, # boolean type (false) | ||
| 43 | repeated => $code_for{red}, # references to seen values | ||
| 44 | caller_info => $code_for{cyan}, # details on what's being printed | ||
| 45 | weak => $code_for{violet}, # weak references flag | ||
| 46 | tainted => $code_for{violet}, # tainted flag | ||
| 47 | unicode => $code_for{magenta}, # utf8 flag | ||
| 48 | escaped => $code_for{red}, # escaped characters (\t, \n, etc) | ||
| 49 | brackets => $code_for{base0}, # (), {}, [] | ||
| 50 | separator => $code_for{base0}, # the "," between hash pairs, array elements, etc | ||
| 51 | quotes => $code_for{'base0'}, | ||
| 52 | unknown => $code_for{red}, # any (potential) data type unknown to Data::Printer | ||
| 53 | 1 | }; | |
| 54 | |||
| 55 | } | ||
| 56 | |||
| 57 | 1 | 1; | |
| 58 | __END__ | ||