Apparently when 'the same' is used as an adverb meaning 'gelijk', it has to be 'hetzelfde'.
It's the difference between a literal translation and an idiomatic one, I think. "Are they the same colours?" is the way I would probably generate this question myself, given the right circumstances (which puts stress on the word colours) while the question as it is given here puts the stress on the idea of sameness. At least, that's how it works in English - I'm no expert on Dutch and can't say if they move stress on words around as we do in English. However, I have Dutch friends whom I'm due to visit soon and will ask them.
Jo, the sentences "Are the colors the same" and "Are they the same colors" are two different sentences, both in Dutch and in English.
(It is obvious from looking at either the English or the Dutch that they are different gramatically. I think you meant to say that you can see no difference semantically (that is, in meaning), not "grammatically".)
But there is also a difference semantically. For example, if you are talking about cars, you might ask, "Are they the same color?" But only if you are talking about the colors themselves will you ask "Are the colors the same"?
You could argue more persuasively that "Are the cars the same color" and "Are the colors of the cars the same" amount to the same question. But those are not the sentences we are working with in this DL exercise.
And even then, I would argue that those two sentences about the cars are different, both in English and in Dutch. The fact that both of the languages can correctly use both of the sentences supports the view that they really are two different sentences. The fact that you might say one rather than the other in the same situation does not change that fact.
Your proposed translation here is not the "difference between an idiomatic and a literal translation". It is the difference between an accurate and an inaccurate translation.
It is asking a question about the colors; are the colors the same? When you go buy paint to match something you already have, you want to insure the colors are the same. This is different than asking if two cars are the same color. In that case the things in question are the cars, are they the same color?