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 _toOTTable(self, ttFont):
      from . import otTables
      from fontTools.colorLib.builder import populateCOLRv0
  
      tableClass = getattr(otTables, self.tableTag)
      table = tableClass()
      table.Version = self.version
  
      populateCOLRv0(
          table,
          {
              baseGlyph: [
                  (layer.name, layer.colorID) for layer in layers
              ]
              for baseGlyph, layers in self.ColorLayers.items()
          },
          glyphMap=ttFont.getReverseGlyphMap(rebuild=True),
      )
      return table
  
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 2 for calling the table_C_O_L_R_ obj's underlying member method code with example usage: obj._toOTTable(ttFont) and returns: table