Yes, but you are not using "vermelho" as an adjective for "cor", it is a noun in this case so it should be masculine. It would be correct in the sentence "a cor vermelha", but in this case "vermelho é uma cor".
It's possibly nitpicking, but the sentence asked for "Red and blue", not "The red and the blue". There is usually very little lenience with articles; "um" and "o" are not interchangeable. I guess "o" and the absence of an article are not interchangeable, either?