Better color code parsing in StringModel

Signed-off-by: Aleksi Sapon <QcTechs@gmail.com>