<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rgb_2_hex(self, r, g, b):
 """ convert a rgb color to hex """

        return "#{:02X}{:02X}{:02X}".format(int(r * 255), int(g * 255), int(b * 255))