code: def nametonum(name):
      
      code = colorcodes.get(name)
      if code is None:
          raise ValueError("%s is not a valid color name." % name)
      else:
          return code
docs: Returns a color code number given the color name.