# # spec file for package perl-Convert-Color # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Convert-Color Name: perl-Convert-Color Version: 0.180.0 Release: 0 # 0.18 -> normalize -> 0.180.0 %define cpan_version 0.18 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Color space conversions and named lookups URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(List::UtilsBy) BuildRequires: perl(Module::Build) >= 0.4004 BuildRequires: perl(Module::Pluggable) BuildRequires: perl(Test2::V0) BuildRequires: perl(meta) >= 0.8.0 Requires: perl(List::UtilsBy) Requires: perl(Module::Pluggable) Requires: perl(meta) >= 0.8.0 Provides: perl(Convert::Color) = %{version} Provides: perl(Convert::Color::CMY) = %{version} Provides: perl(Convert::Color::CMYK) = %{version} Provides: perl(Convert::Color::HSL) = %{version} Provides: perl(Convert::Color::HSV) = %{version} Provides: perl(Convert::Color::RGB) = %{version} Provides: perl(Convert::Color::RGB16) = %{version} Provides: perl(Convert::Color::RGB8) = %{version} Provides: perl(Convert::Color::VGA) = %{version} Provides: perl(Convert::Color::X11) = %{version} %undefine __perllib_provides %{perl_requires} %description This module provides conversions between commonly used ways to express colors. It provides conversions between color spaces such as RGB and HSV, and it provides ways to look up colors by a name. This class provides a base for subclasses which represent particular color values in particular spaces. The base class provides methods to represent the color in a few convenient forms, though subclasses may provide more specific details for the space in question. For more detail, read the documentation on these classes; namely: * Convert::Color::RGB - red/green/blue as floats between 0 and 1 * Convert::Color::RGB8 - red/green/blue as 8-bit integers * Convert::Color::RGB16 - red/green/blue as 16-bit integers * Convert::Color::HSV - hue/saturation/value * Convert::Color::HSL - hue/saturation/lightness * Convert::Color::CMY - cyan/magenta/yellow * Convert::Color::CMYK - cyan/magenta/yellow/key (blackness) The following classes are subclasses of one of the above, which provide a way to access predefined colors by names: * Convert::Color::VGA - named lookup for the basic VGA colors * Convert::Color::X11 - named lookup of colors from X11's _rgb.txt_ %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Build.PL --installdirs=vendor ./Build build --flags=%{?_smp_mflags} %check ./Build test %install ./Build install --destdir=%{buildroot} --create_packlist=0 %perl_gen_filelist %files -f %{name}.files %doc Changes examples README %license LICENSE %changelog