Convert::Color::LCh - a color value in the CIE LCh color space
use Convert::Color::LCh; my $red = Convert::Color::LCh->new(53.23712, 179.03810, 12.17705); my $green = Convert::Color::LCh->new('87.73552,135.78953,127.71501'); use Convert::Color; my $blue = Convert::Color->new('lch:32.30087,130.68975,265.87432'); say $red->L; # 53.23712 say $red->C; # 179.03810 say $red->h; # 12.17705 say join ',', $blue->lch; # 32.30087,130.68975,265.87432
Objects of this class represent colors in the CIE LCh color space.
- Convert::Color::LCh->new($l, $c, $h)
Construct a color from its components.
Construct a color from a string. The string should contain the three components, separated by commas.
Accessors for the three components of the color.
Returns the three components as a list.
Marius Gavrilescu, <email@example.com>
Copyright (C) 2015-2017 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.