<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_html(self):
 """ Converts to Hex """

        out = "#"
        if self.r == 0:
            out += "00"
        else:
            out += hex(self.r)[2:]
        if self.b == 0:
            out += "00"
        else:
            out += hex(self.b)[2:]
        if self.g == 0:
            out += "00"
        else:
            out += hex(self.g)[2:]
        return out