That works, although I'm not sure why you would want to use an indexed table based on Blizzard's arbitrary and unintuitive CLASS_SORT_ORDER values, instead of a hash table with class/color pairs.
On a marginally related note, the MoP betas for
!ClassColors support the
colorStr key, so if your addon supports that you can read the values from there... and if your addon doesn't support it, it should.