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

9.1. RGBModel.__init_(): Constructor

All the constructor has to do is to call the parent class constructor, and supply the model's name and the names of its three parameters. See Section 7, “class ColorModel: Base class for color models”.

huey
# - - -   R G B M o d e l . _ _ i n i t _ _

    def __init__ ( self ):
        """Constructor for RGBModel."""
        ColorModel.__init__ ( self, "RGB",
          ("red", "green", "blue") )