Next / Previous / Contents / TCC Help System / NM Tech homepage

17.1. ModelSelector: Constants

The set of concrete classes of ColorModel, representing the different color models that the user can select, is a class attribute. See Section 8, “class HSVModel: Hue-saturation-value color model”, Section 9, “class RGBModel: Red-green-blue color model”, and Section 10, “class CMYModel: Cyan-magenta-yellow color model”.

huey
    __modelList  =  [ HSVModel(), RGBModel(), CMYModel() ]

To add a new model, write its class inheriting from ColorModel, implement its virtual methods, and add a call to its constructor to the line above.