class_docstr: This table is structured so that you can treat it like a dictionary keyed by glyph name.
  
  ``ttFont['COLR'][<glyphName>]`` will return the color layers for any glyph.
  
  ``ttFont['COLR'][<glyphName>] = <value>`` will set the color layers for any glyph.
class_docstr_tok: ["This","table","is","structured","so","that","you","can","treat","it","like","a","dictionary","keyed","by","glyph","name",".","``","ttFont","[","'COLR","'","]","[","<","glyphName",">","]","``","will","return","the","color","layers","for","any","glyph",".","``","ttFont","[","'COLR","'","]","[","<","glyphName",">","]","=","<","value",">","``","will","set","the","color","layers","for","any","glyph","."]
code: def fromXML(self, name, attrs, content, ttFont):
      if name == "version":  # old COLR v0 API
          setattr(self, name, safeEval(attrs["value"]))
      elif name == "ColorGlyph":
          if not hasattr(self, "ColorLayers"):
              self.ColorLayers = {}
          glyphName = attrs["name"]
          for element in content:
              if isinstance(element, str):
                  continue
          layers = []
          for element in content:
              if isinstance(element, str):
                  continue
              layer = LayerRecord()
              layer.fromXML(element[0], element[1], element[2], ttFont)
              layers.append(layer)
          self.ColorLayers[glyphName] = layers
      else:  # new COLR v1 API
          from . import otTables
  
          if not hasattr(self, "table"):
              tableClass = getattr(otTables, self.tableTag)
              self.table = tableClass()
          self.table.fromXML(name, attrs, content, ttFont)
          self.table.populateDefaults()
          self.version = self.table.Version
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/C_O_L_R_.py
imports: from fontTools.misc.textTools import safeEval
  from .None import DefaultTable
label_desc: Use image node_id 6 for calling the table_C_O_L_R_ obj's underlying member method code with example usage: obj.fromXML(name, attrs, content, ttFont) without return types