Color Archives

Hai Julia !

I released Juliagraph an interactive fractal painter for Julia and Mandelbrot types of fractal.


Single Color Methods of GTC

Whohoo release 1.7 (and 1.6) brought a thorough architectural rewrite, new color spaces (HSV, HWB, YIQ), new formats ([named] array, string and css_string), choosable value ranges, closed both open issues, and introduced the named argument API I wrote last time about. And as promised, this post is about the methods: distance, set, add and blend.

GTC API (how to design a rich interface)

After written about the origin and goals of Graphics::Toolkit::Color -- let's take a look at the public methods and make it a little study of good API design. But lets work our way up from a few examples:

Why YACM (yet another color module) ?

At the recent YAPC::EU (still running) I gave a talk about my latest CPAN module: Graphics::Toolkit::Color (in short GTC - v1.53). It went a little out of hand and even worse: some of the key thoughts I did not formulate as clear as wanted. That is why I use this channel to correct that. In this first part I outline the goal of the module and the next part will be about the design principles of the public API, moving than into implementation details and the general issues when dealing with colors.

Color Evolution

The most requested feature of the Cellgraph is now in operation: Colors.

I added one panel with all the options and functions to control them. It is a little complex, but well documented (see here). In short you can load and save from and to the config file single colors and color sets under special names. And then you have direct access to the gradient and the complimentary function of Graphics::Toolkit::Color. Reverting to the default grayscale is always possible with an push on a button.

The deep, the shallow and the ugly (classes)

Previously I showed parts of the API of my new module Graphics::Toolkit::Color. This time I want to mention some bits about the code base, which demonstrate what I tried to say long ago (sorry for the long delay i hope I can complete the series).

Look mom I invented colors

Just released Graphics::Toolkit::Color for the purpose to create computationally harmonic color pallets (2-3 lines max for most needs). It is in fact a chunk out of Chart I needed to reuse in other projects as the Harmonograph. And as you can see in the SEE ALSO section of the POD - I'm aware that there are plenty other modules doing, parts, similar stuff or even more.

About lichtkind

user-pic Kephra, Articles, Books, Perl, Programming