File: color_round.t

package info (click to toggle)
libcolor-calc-perl 1.074-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 320 kB
  • sloc: perl: 399; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use Test::More tests => 14;
use Test::NoWarnings;

use Color::Calc( 'OutputFormat' => 'hex', 'ColorScheme' => 'WWW' );

is( color_round('black'),	'000000' );
is( color_round('white'),	'ffffff' );

is( color_round('green'),	'009900' );
is( color_round('maroon'),	'990000' );
is( color_round('silver'),	'cccccc' );

is( color_round('#c6c6c6'),	'cccccc' );
is( color_round('#c7c7c7'),	'cccccc' );

is( color_round('#222222'),	'333333' );
is( color_round('#808080'),	'999999' );
is( color_round('#DDDDDD'),	'cccccc' );

is( color_round('#AABBEE'),	'99ccff' );
is( color_round('#08FC23'),	'00ff33' );
is( color_round('#3247CF'),	'3333cc' );