Color is not changing for a union even though it works perfectly fine for a different union

Is there a way to convert union to mesh?

It ended up working! One of the quotes was in wrong.