[vtk-developers] Interest in a vtkColor class?

Brad King brad.king at kitware.com
Tue Mar 22 08:17:05 EST 2005


Andrew Maclean wrote:
> Thanks for your comments. I just wanted something in a class that doesn't
> add a whole mass of static variables and also gives the user the ability to
> add new colours to their tables. The values of the colours won't change in
> the map but the user can add new colours or delete if they want. Someone
> might want "alizarin purple"!
> 
> If no-one thinks this is of any use and maybe my solution is probably a bit
> too sophisticated, could we perhaps just rename vtkTestingColors.h to say
> vtkColors.h and move it into Commmon? This would be quite useful. I would be
> quite happy with this approach. 
> 
> This has just been motivated because I like to be able to set the same
> colours in the TCL scripts and in the C++ code. Also when given an option
> for colours, users often remember names better. I have a colour combo-box in
> windows that lets the user select a named colour patch or make their own
> colour. Hence the motivation for a map of colours keyed by name.

Having a vtkColor generation class is certainly a reasonable idea.  If 
you implement one please post the interface to this list for 
comments/discussion.  Once it is finished you can submit a feature 
request here:

http://www.vtk.org/Bug

and then go back in and add the source files to the report.

-Brad



More information about the vtk-developers mailing list