copied set_colors.m from cortex