You could do this with Conditional Formatting.
1. highlight the range you want to apply the conditional formatting to (B1)
2. on the home tab, styles, select CF
3. select new rule, select use formula
4. enter =A1="Black" format fill Black
repeat 3 & 4 for the other colors