bugfix: correct ANSI colors range in rgb_to_ansi

The function was trying to convert colors with values greater than 234, which do not exists in ANSI.