File: import_object.t

package info (click to toggle)
libcolor-calc-perl 1.074-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 240 kB
  • ctags: 40
  • sloc: perl: 398; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 893 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
23
24
25
use Test::More tests => 14;
use Test::NoWarnings;
require Color::Calc;

SKIP: {
eval { require Graphics::ColorObject; };
skip "Graphics::ColorObject not installed", 13 if $@;

Color::Calc->import( 'OutputFormat' => 'object' );

is(lc color_get		('red')->as_RGBhex,		'ff0000');
is(lc color    		('red')->as_RGBhex,		'ff0000');
is(lc color_mix		('red','blue')->as_RGBhex,	'800080');

is(lc color_blend_bw	('red')->as_RGBhex,		'ff8080');
is(lc color_blend	('red')->as_RGBhex, 		'808080');
is(lc color_bw		('red')->as_RGBhex,		'4d4d4d');
is(lc color_contrast_bw	('red')->as_RGBhex,		'ffffff');
is(lc color_contrast	('red')->as_RGBhex,		'00ffff');
is(lc color_dark	('red')->as_RGBhex,		'800000');
is(lc color_gray	('red')->as_RGBhex,		'4d4d4d');
is(lc color_grey	('red')->as_RGBhex,		'4d4d4d');
is(lc color_invert	('red')->as_RGBhex,		'00ffff');
is(lc color_light	('red')->as_RGBhex,		'ff8080');
}