File: README.mkdn

package info (click to toggle)
libgraphics-color-perl 0.31-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 220 kB
  • ctags: 53
  • sloc: perl: 661; makefile: 2
file content (73 lines) | stat: -rw-r--r-- 1,736 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# NAME

Graphics::Color - Device and library agnostic color spaces.

# VERSION

version 0.31

# SYNOPSIS

    my $color = Graphics::Color::RGB->new(
        red => .5, green => .5, blue => .5, alpha => .5
    );
    say $color->as_string;

# DESCRIPTION

Graphics color is a device and library agnostic system for creating and
manipulating colors in various color spaces.

# DISCLAIMER

I'm not an art student or a wizard of arcane color knowledge.  I'm a normal
programmer with a penchant for things graphical.  Hence this module is likely
incomplete in some places.  Patches are encouraged.  I've intentions of adding
more color spaces as well as conversion routines (where applicable).

# COLOR TYPES

The following color types are supported.

[CMYK](https://metacpan.org/pod/Graphics::Color::CMYK)

[HSL](https://metacpan.org/pod/Graphics::Color::HSL)

[HSV](https://metacpan.org/pod/Graphics::Color::HSV)

[RGB](https://metacpan.org/pod/Graphics::Color::RGB)

[YIQ](https://metacpan.org/pod/Graphics::Color::YIQ)

[YUV](https://metacpan.org/pod/Graphics::Color::YUV)

# METHODS

## derive

Clone this color but allow one of more of it's attributes to change by passing
in a hashref of options:

    my $new = $color->derive({ attr => $newvalue });

The returned color will be identical to the cloned one, save the attributes
specified.

## equal\_to

Compares this color to the provided one.  Returns 1 if true, else 0;

## not\_equal\_to

The opposite of equal\_to.

# AUTHOR

Cory G Watson <gphat@cpan.org>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Cold Hard Code, LLC.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.