You don't have to assign the colors to particular dimension values.
For example, this background color expression:
Pick(RowNo(),
RGB(r,g,b),
... (more color expressions)
)
will work no matter what the chart dimension is. To avoid typing all those colors in expression, you could also store them in data and use something like