<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_code(cls, code: int) -> 'ColorCode': """ Return a ColorCode from a terminal code. """

        c = cls()
        c._init_code(code)
        return c