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 toXML(self, writer, ttFont):
      if hasattr(self, "table"):
          self.table.toXML2(writer, ttFont)
      else:
          writer.simpletag("version", value=self.version)
          writer.newline()
          for baseGlyph in sorted(
              self.ColorLayers.keys(), key=ttFont.getGlyphID
          ):
              writer.begintag("ColorGlyph", name=baseGlyph)
              writer.newline()
              for layer in self.ColorLayers[baseGlyph]:
                  layer.toXML(writer, ttFont)
              writer.endtag("ColorGlyph")
              writer.newline()
  
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 5 for calling the table_C_O_L_R_ obj's underlying member method code with example usage: obj.toXML(writer, ttFont) without return types