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   680 use v5.12;
  8         28  
2 8     8   41 use warnings;
  8         16  
  8         334  
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         16  
  8         1003  
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 7 sub from_rgb { map { 1 - $_} @_ }
  6         18  
13 3     3 0 9 sub to_rgb { map { 1 - $_} @_ }
  9         56  
14              
15             $cmy_def;
16