class RGB:
    def __init__(self, r : int = 0, g : int = 0, b : int = 0):
        self.r = r
        self.g = g
        self.b = b

    def __str__(self):
        return f"({self.r}, {self.g}, {self.b})"
    
    def of(self):
        return f"#{self.r:02X}{self.g:02X}{self.b:02X}"
    
    def ofnum(r : int, g : int, b : int):
        return f"#{r:02X}{g:02X}{b:02X}"
    
    def ofhex(hex_str : str):
        hex_str = hex_str.lstrip('#')
        r, g, b = tuple(int(hex_str[i:i+2], 16) for i in (0, 2, 4))
        return r, g, b