File: 04lab.t

package info (click to toggle)
libgraphics-colorobject-perl 0.5.0-10.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: perl: 1,754; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Test::More tests => 4;
BEGIN { use_ok('Graphics::ColorObject') };

ok( Graphics::ColorObject::_delta_v3( 
    Graphics::ColorObject->new_XYZ([0.634215, 0.327965, 0.947785], white_point => 'D65')->as_Lab(),
    [63.995843, 92.111668, -53.029855] 
) < 0.05 );

ok( Graphics::ColorObject::_delta_v3( 
    Graphics::ColorObject->new_XYZ([0.634215, 0.327965, 0.947785], white_point => 'D65')->as_LCHab(),
    [63.995843, 106.286052, -29.92958] 
) < 0.005 );

ok( Graphics::ColorObject::_delta_v3( 
    Graphics::ColorObject->new_Lab([63.995843, 92.111668, -53.029855], white_point => 'D65')->as_XYZ(),
    [0.634215, 0.327965, 0.947785]
) < 0.005 );