These colours are not used in the CD library, but were developed by Pinkfish@Discworld to enable colours in players' say and tell commands. Some muds (like TMI-2) seem to support these codes in all commands, but most (like OuterSpace) only support Pinkfish codes for the intermud lines.
These codes are always surrounded by %^ pairs. So in order to send the text foobar in red, use %^RED%^foobar%^RESET%^. If you want to quote the litteral text %^, it should be sent as %%^^.
Known codes are:
RED BLUE ORANGE YELLOW GREEN BLACK WHITE CYAN MAGENTA B_RED B_BLUE B_ORANGE B_YELLOW B_GREEN B_MAGENTA B_BLACK B_WHITE B_CYAN FLASH BOLD REVERSE UNDERLINE INITTERM RESET WINDOW ENDTERM STATUS