

def _repr_html_(self):
    html = '\n        <span style="background-color:#{red:02X}{green:02X}{blue:02X};\n                     display:inline-block;\n                     line-height:1em;\n                     width:1em;">&nbsp;</span>\n        <strong>#{red:02X}{green:02X}{blue:02X}</strong>\n        '
    return html.format(red=self.red_int8, green=self.green_int8, blue=self.blue_int8)

dataset/ETHPy150Open dahlia/wand/wand/color.py Color._repr_html_/original