File Coverage

lib/Graphics/Toolkit/Color/Space/Instance/CMY.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 17 19 89.4


line stmt bran cond sub pod time code
1 8     8   652 use v5.12;
  8         25  
2 8     8   44 use warnings;
  8         15  
  8         307  
3              
4             # CMY color space specific code
5              
6             package Graphics::Toolkit::Color::Space::Instance::CMY;
7 8     8   452 use Graphics::Toolkit::Color::Space;
  8         29  
  8         1038  
8              
9             my $cmy_def = Graphics::Toolkit::Color::Space->new( axis => [qw/cyan magenta yellow/] );
10             $cmy_def->add_converter('RGB', \&to_rgb, \&from_rgb );
11              
12 2     2 0 8 sub from_rgb { map { 1 - $_} @_ }
  6         20  
13 3     3 0 9 sub to_rgb { map { 1 - $_} @_ }
  9         42  
14              
15             $cmy_def;
16