<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rgb2hex(r: int, g: int, b: int) -> str: """ Convert rgb values to a hex code. """

    return '{:02x}{:02x}{:02x}'.format(r, g, b)