'Return the colormode or set it to 1.0 or 255.
Optional argument:
cmode -- one of the values 1.0 or 255
r, g, b values of colortriples have to be in range 0..cmode.
Example (for a TurtleScreen instance named screen):
>>> screen.colormode()
1.0
>>> screen.colormode(255)
>>> pencolor(240,160,80)'

def colormode(self, cmode=None):

    if (cmode is None):
        return self._colormode
    if (cmode == 1.0):
        self._colormode = float(cmode)
    elif (cmode == 255):
        self._colormode = int(cmode)
