Skip Menu |

This queue is for tickets about the Color-Spectrum CPAN distribution.

Report information
The Basics
Id: 27352
Status: resolved
Priority: 0/
Queue: Color-Spectrum

People
Owner: Nobody in particular
Requestors: davidp [...] preshweb.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: WISH: multi-colour spectrums
Hi, Is Color::Spectrum still maintained? If so, I'd like to contribute a patch to add multiple colour fades (i.e. fade from red to green to blue, e.g.: # a fade from red to green to blue, in 25 steps: generate(25, '#FF0000', '#00FF00', '#0000FF'); If Color::Spectrum is no longer actively being maintained, I'd be more than happy to take over maintainership and release a new version. Many thanks David Precious
I've emailed the author directly enquiring as to whether Color::Spectrum is still being maintained, and offering to take over maintainership if he is no longer maintaining it.
There is a difference between active maintenance and a finished tool*. This module is pretty much complete. I see no reason whatsoever to apply such a feature to this module -- all you need to do is call generate() multiple times. For example, this will accomplish exactly what you need: my @color = ( $spectrum->generate(13,'#FF0000','#00FF00'), ($spectrum->generate(13,'#00FF00','#0000FF'))[1..12], ); Notice the distinct lack of 'u' as well. ;) Cheers! (* note that I do admit neglecting fixing the 2 active bugs for this distro, but those bugs involve usage not recommended by the API -- and fixes are on the way). On Thu May 31 08:42:45 2007, BIGPRESH wrote: Show quoted text
> Hi, > > Is Color::Spectrum still maintained? > > If so, I'd like to contribute a patch to add multiple colour fades (i.e. > fade from red to green to blue, e.g.: > > # a fade from red to green to blue, in 25 steps: > generate(25, '#FF0000', '#00FF00', '#0000FF'); > > If Color::Spectrum is no longer actively being maintained, I'd be more > than happy to take over maintainership and release a new version. > > Many thanks > > David Precious
Fair enough, it was just a suggestion for a feature I thought would be useful. Agreed that it's just a use-case which the module can already fulfil, but making things easier and cleaner is always nice, IMO. Oh, and as for the "distinct lack of 'u'" comment, I will spell the word colour the way I consider correct (for I am English) whilst talking generally, but will spell it the Americanised way when referring to the name of your module :)
"Agreed that it's just a use-case which the module can already fulfil" Glad that we agree that not only is this feature not needed, but a complete take over of the module is not needed either. Please try and spell "Americanized" the American way as well. On Tue Aug 25 11:52:42 2009, BIGPRESH wrote: Show quoted text
> Fair enough, it was just a suggestion for a feature I thought would be > useful. > > Agreed that it's just a use-case which the module can already fulfil, > but making things easier and cleaner is always nice, IMO. > > Oh, and as for the "distinct lack of 'u'" comment, I will spell the word > colour the way I consider correct (for I am English) whilst talking > generally, but will spell it the Americanised way when referring to the > name of your module :)
"but making things easier and cleaner is always nice" I do not agree with such general statements. It is not *always* nicer. Consider the amount of code you wanted to add to accomplish this -- nearly 40 lines. Why is all of that code necessary? I showed you how this can be done by reusing your data, and by stacking simple array slices. Additionally, while i don't discourage your module -- it breaks inheritance by not truly behaving like a sub class. A sub class should be able to refer to itself, and not have to make direct calls to its parent, as your implementation does. I just hope that people peek under the hood when they consider using yours, because i was not too excited about adding your patch to this module, to say the least. On Tue Aug 25 11:52:42 2009, BIGPRESH wrote: Show quoted text
> Fair enough, it was just a suggestion for a feature I thought would be > useful. > > Agreed that it's just a use-case which the module can already fulfil, > but making things easier and cleaner is always nice, IMO. > > Oh, and as for the "distinct lack of 'u'" comment, I will spell the word > colour the way I consider correct (for I am English) whilst talking > generally, but will spell it the Americanised way when referring to the > name of your module :)