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   684 use v5.12;
  8         25  
2 8     8   43 use warnings;
  8         15  
  8         334  
3              
4             # CMY color space specific code
5              
6             package Graphics::Toolkit::Color::Space::Instance::CMY;
7 8     8   476 use Graphics::Toolkit::Color::Space;
  8         22  
  8         1084  
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 6 sub from_rgb { map { 1 - $_} @_ }
  6         20  
13 3     3 0 8 sub to_rgb { map { 1 - $_} @_ }
  9         59  
14              
15             $cmy_def;
16