def addColor (self, node):
        if hasattr (node, '__iter__'):
            for child in node:
                self.addColor (child)
        try:
            key = node.xml['name']
            node.style.fill = self.colors[key]
        except __HOLE__:
            node.style.fill = self.graph ().settings.barColor
        if node.xml.has_key ('has-tooltip'):
            node.xml['has-highlight'] = True
            node.xml['default-fill'] = node.style.fill
            node.xml['highlight-fill'] = node.style.fill.interpolate (white, .35)
dataset/ETHPy150Open dotskapes/dotSkapes/modules/savage/graph/canvas.py/BarCanvas.addColor