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

    return hex2term_map[rgb2termhex(r, g, b)]