|
Posted by pkj on November 13, 2006, 2:23 pm
Please log in for more thread options
I am looking for comments on a new module I propose
for inclusion in CPAN:
Graphics::ColorUtils
This module will provide helper functions to manage
color. It will be useful when generating graphics using
modules such as GD, Tk, or when generating HTML/CSS.
The module provides three sets of features:
- Color space conversion (RGB to HSV, etc)
- Color gradients (useful for data visualization)
- Color lookup by name
The main rationale for creating a new module was
the need for a module with easy-to-use color conversions
(easier than Graphics::ColorObject). Also, color gradients
are often useful for data visualization, but are currently not
offered by any Perl module (that I am aware of). Name
lookup has been thrown in for good measure, but I do not
consider it essential (Graphics::ColorNames does something
very similar).
The design objectives were:
- A simple and intuitive API, which has a small enough
footprint that it can be used inline in calls to other
functions.
- Platform independence (do not assume X11)
- Minimal dependencies
The current version of the code and documentation are
available here:
http://www.beyondcode.org/projects/index.html
Related modules and existing work:
- Graphics::ColorObject (and Color::Object) do color space
conversions, but using a very different API, much less
suitable for the intended usage of the proposed module.
- Graphics::ColorNames and Color::Rgb do color-for-name
lookup. (There is real redundancy with ColorNames
and the current module - should it be dropped? However,
there is real benefit in keeping all functionality together.)
- No module offers color gradients (to my knowledge).
Any thoughts/suggestions?
|
|
Posted by Ron Savage on November 13, 2006, 3:53 pm
Please log in for more thread options
On Tue, 14 Nov 2006 06:23:39 +1100, pkj wrote:
Hi
> The module provides three sets of features:
> - Color space conversion (RGB to HSV, etc)
> - Color gradients (useful for data visualization)
> - Color lookup by name
How about putting these 3 features in 3 modules, all under your chosen
namespace?
|
|
Posted by John Bokma on November 13, 2006, 3:55 pm
Please log in for more thread options
> - Graphics::ColorNames and Color::Rgb do color-for-name
I suggest to call the latter Color::RGB, the Rgb is going to confuse me at
least, and might confuse more people.
> - No module offers color gradients (to my knowledge).
I am very interested in this one :-D.
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
|
|
Posted by pkj on November 13, 2006, 4:40 pm
Please log in for more thread options
Just to clarify - I did NOT write Color::Rgb. That is a pre-existing
module,
which I am just mentioning here for comparison purposes.
John Bokma wrote:
>
> > - Graphics::ColorNames and Color::Rgb do color-for-name
>
> I suggest to call the latter Color::RGB, the Rgb is going to confuse me at
> least, and might confuse more people.
>
> > - No module offers color gradients (to my knowledge).
>
> I am very interested in this one :-D.
>
> --
> John Experienced Perl programmer: http://castleamber.com/
>
> Perl help, tutorials, and examples: http://johnbokma.com/perl/
|
|
Posted by John Bokma on November 13, 2006, 6:30 pm
Please log in for more thread options
>
> Just to clarify - I did NOT write Color::Rgb. That is a pre-existing
> module,
> which I am just mentioning here for comparison purposes.
Ah, my bad, apologies.
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
|
| Similar Threads | Posted | | advice needed on using proper perl graphics module(s) | November 4, 2004, 1:02 pm |
| Graphics Display Message board using Perl? | May 18, 2007, 5:04 pm |
| Lower case module name for non-pragma module | January 4, 2005, 10:19 am |
| RFC: New module 'Module::Bundled::Files' | August 26, 2005, 3:49 pm |
| help with an MD5.pm module!! | September 3, 2005, 11:39 pm |
| Looking for RTP module | December 9, 2004, 9:17 pm |
| module for FFT | May 9, 2005, 3:06 pm |
| Module may not be right one? | April 27, 2006, 12:57 pm |
| The 'if' module | June 1, 2006, 8:18 pm |
| The 'if' module | June 1, 2006, 8:26 pm |
|