# NAME

Chart::Colors - Perl extension to return an endless stream of new distinct RGB colours codes (good for coloring any number of chart lines)

# SYNOPSIS

```perl
    #!/usr/bin/perl -w
      
    use Chart::Colors;

    my $colors = new Chart::Colors();
    my $nextcolor_hex=$colors->Next('hex');     # Get an HTML-Style answer, like F85099 (put a # in front to use in HTML, i.e. #F85099)
    my($r,$g,$b)=$colors->Next('rgb');          # Get red, green, and blue ints separately, like (255,123,88)
    my($h,$s,$v)=$colors->Next('hsv');          # Get hue, saturation, and brightness
```

# DESCRIPTION

This module outputs an infinte sequence of visually distinct different colours.

It is useful for colorizing the lines on charts etc.

## EXPORT

None by default.

## Notes

## new

Usage is

```perl
    my $colors = new Chart::Colors();
```

## Next

Usage is

```perl
    my $nextcolor_hex = $colors->Next('hex');
```

or

```perl
    my($r,$g,$b)=$colors->Next('rgb');
```

## hsv\_to\_rgb

```perl
    my($r,$g,$b)=$this->hsv_to_rgb($h,$s,$v);
```

# AUTHOR

This module was written by Chris Drake `cdrake@cpan.org`, and based on https://stackoverflow.com/questions/24852345/hsv-to-rgb-color-conversion

# COPYRIGHT AND LICENSE

Copyright (c) 2019 Chris Drake. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.18.2 or,
at your option, any later version of Perl 5 you may have available.
