Debian Codegraph @

t/color_safe.t

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 use Test::More tests => 14;
2 use Test::NoWarnings;
3
4 use Color::Calc( 'OutputFormat' => 'hex', 'ColorScheme' => 'WWW' );
5
6 is( color_safe('black'), '000000' );
7 is( color_safe('white'), 'ffffff' );
8
9 is( color_safe('green'), '008000' );
10 is( color_safe('maroon'), '800000' );
11 is( color_safe('silver'), 'c0c0c0' );
12
13 is( color_safe('#c6c6c6'), 'c0c0c0' );
14 is( color_safe('#c7c7c7'), 'cccccc' );
15
16 is( color_safe('#222222'), '333333' );
17 is( color_safe('#8F807F'), '808080' );
18 is( color_safe('#808080'), '808080' );
19
20 is( color_safe('#AABBEE'), '99ccff' );
21 is( color_safe('#08FC23'), '00ff33' );
22 is( color_safe('#3247CF'), '3333cc' );