added function to translate codes to color and shape text strings