« ColorTheme/Data/Dump/Color/Light.pm
↑ Summary
auto/share/dist/Data-Dump-Color/examples/example.pl »
| 1 | package ColorTheme::Data::Dump::Color::Default16; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 1 | ▶ | use parent 'ColorThemeBase::Static::FromStructColors'; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 1 | ▶ | use Term::ANSIColor; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | |||||||||||||||
| 7 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||||||
| 8 | 1 | our $DATE = '2025-02-21'; # DATE | |||||||||||||
| 9 | 1 | our $DIST = 'Data-Dump-Color'; # DIST | |||||||||||||
| 10 | 1 | our $VERSION = '0.251'; # VERSION | |||||||||||||
| 11 | |||||||||||||||
| 12 | 12 | ▶ | sub _ansi16 { | ||||||||||||
|
Subroutine
_ansi16: called CC=3 SCAR=11.1
| |||||||||||||||
| 13 | 12 | my ($fg, $bg) = @_; | |||||||||||||
| 14 | return { | ||||||||||||||
| 15 | 12 | ▶ | (defined $fg ? (ansi_fg=>color($fg)) : ()), | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 16 | (defined $bg ? (ansi_bg=>color($bg)) : ()), | ||||||||||||||
| 17 | }; | ||||||||||||||
| 18 | } | ||||||||||||||
| 19 | |||||||||||||||
| 20 | 1 | our %THEME = ( | |||||||||||||
| 21 | v => 2, | ||||||||||||||
| 22 | items => { | ||||||||||||||
| 23 | Regexp => _ansi16('yellow'), | ||||||||||||||
| 24 | undef => _ansi16('bright_red'), | ||||||||||||||
| 25 | number => _ansi16('bright_blue'), # floats can have different color | ||||||||||||||
| 26 | float => _ansi16('cyan'), | ||||||||||||||
| 27 | string => _ansi16('bright_yellow'), | ||||||||||||||
| 28 | object => _ansi16('bright_green'), | ||||||||||||||
| 29 | glob => _ansi16('bright_cyan'), | ||||||||||||||
| 30 | key => _ansi16('magenta'), | ||||||||||||||
| 31 | comment => _ansi16('green'), | ||||||||||||||
| 32 | keyword => _ansi16('blue'), | ||||||||||||||
| 33 | symbol => _ansi16('cyan'), | ||||||||||||||
| 34 | linum => _ansi16('black', 'on_white'), # file:line number | ||||||||||||||
| 35 | }, | ||||||||||||||
| 36 | ); | ||||||||||||||
| 37 | |||||||||||||||
| 38 | #use Data::Dump; dd \%THEME; | ||||||||||||||
| 39 | |||||||||||||||
| 40 | 1 | 1; | |||||||||||||
| 41 | # ABSTRACT: Default color theme for Data::Dump::Color (16 color) | ||||||||||||||
| 42 | |||||||||||||||
| 43 | __END__ | ||||||||||||||