Yes, it's grammatical—but in a slightly unconventional way. A sky of blue leads the listener to hear the adjective "blue" as a noun. It gives emphasis to the color in a way that "a blue sky" would not. Similarly for a curtain of green, a sea of grey, etc. You are right to notice that more ordinary grammar would make these "a blue sky", "a green curtain", "a grey sea", etc.
Writing noun preposition adjective instead of the customary adjective noun is a figure of speech—a deliberately unconventional use of language for rhetorical effect. It's a poetic device, not common in everyday speech or even in writing. Below are some similar figures of speech.*
The future was wide open. … The sky was the limit. Into the great wide open. [From a song by Tom Petty and the Heartbreakers. "Wide open" is first used as an adjective and then coerced into serving as a noun. This is abnormal grammar for poetic effect, giving concrete form to a feeling of limitless possibility.]
Go directly to fabulous. [An advertising slogan for the California Lottery. This kind of figure of speech is common in advertising, where the violation of grammar helps make a phrase memorable because it stands out from ordinary speech. This article in The Week documents many more.]
The hotelier's bank account was in the red, so he went into politics. ["In the red" is a familiar idiom for a negative bank balance. Like many idioms, it is a figure of speech. The word "red" here is an adjective treated as a noun, referring to the red ink used by accountants to record debts or losses.]
The King's name is a tower of strength. [Shakespeare, Richard III, 5.3.12. More evocative than "a strong tower". The reversed wording suggests that the King's name is a kind of source from which people can draw strength for themselves. Notice here that the adjective "strong" changed to the noun "strength". "A tower of strong" would unambiguously violate grammar, making it more jarring and hence more figurative.]
Dictionary entries for color words usually list them as both adjective and noun. One might therefore conclude that a sky of blue strictly follows the ordinary rules of grammar and therefore isn't figurative. I think a better way to understand it is that people hear "blue" primarily as an adjective but that pressing it into service as a noun is common and familiar enough for dictionaries to mention it. (The ordinary noun for "blue" is "blueness".)
Rules are a helpful crutch for beginners, but eventually one must outgrow the expectation that English works only by rules. The real principle is that we understand less-familiar forms and phrases as variants of more-familiar ones (as in any language). Three very strong, familiar landmarks in English are: "a blue sky", using "blue" as an adjective, and noun preposition noun. To understand "a sky of blue", we let "blue" slip into the role of a noun. This is easy because treating "blue" as a noun where needed is pretty familiar, but as you noticed, the clash with blue's ordinary role as an adjective is slightly odd here—just enough to make a figure of speech. The figurative meaning comes from the fact that we still treat "blue" as a modifier on "sky" but we're also influenced by many other "of" phrases, which name a material, origin, or other aspects of things felt to be deep or essential: "a sword of iron", "flowers of summer", etc.
Into the great wide open makes a stronger figure of speech because it abuses "wide open", which is normally an adjective. But treating the adjective "open" as a noun with roughly this meaning has been done enough that dictionaries mention it, so this phrase relates easily to another familiar landmark. Go directly to fabulous is jarring because "fabulous" has almost no history of being coerced to a noun, but the phrase as a whole is close enough to familiar landmarks that we easily understand it as a playful, deliberate variation.
A beginner lacks the familiarity with English needed to stray from the landmarks in a way that a fluent speaker will understand as deliberate. When beginners try this, it usually just sounds like a mistake. There can be no precise rules to learn, since by definition a figure of speech bends the ordinary customs of language.
So, here is the lesson from all this: you should master the most familiar landmarks and notice how common figures of speech, like a sky of blue and in the red, relate to the familiar landmarks that they vary. That's what enables you to leave rules behind and communicate by creatively combining common cultural reference points—the way everyone communicates in their native language.
* There are names for these figures of speech, though they are not widely known. Using a word as a part of speech that it normally doesn't play, like using an adjective as a noun, is called anthimeria. Putting a word into a different grammatical case than usual, such as making it into the object of a preposition when normally it wouldn't be, is antiptosis.
1Is it just my imagination, or are we more likely to use this construct with colors instead of other adjectives? Maybe that's because a color like red or green can be used as a noun as well as an adjective? I mean, we might say, "A bumpy driveway," but "A driveway of bumpiness" is about as awkward as can be. – J.R. – 2019-10-06T23:46:14.583
1@J.R. I searched my mind for several minutes for an example that doesn't involve a color, and I couldn't come up with one. I went to get my copy of Figures of Speech by Arthur Quinn to see if he had one, and indeed he had quite a few. – Ben Kovitz – 2019-10-06T23:48:57.200
Strength and strong aren't the same word. And wouldn't roaring be a gerund? – 6768 – 2019-10-07T03:29:29.933
1@fredsbend The general idea of antiptosis is that you put a word into a different grammatical form or case than normal. In English, that works out to "make it the object of a preposition somehow". I was hoping to skip those details, but thanks, maybe they're needed. And thanks for of evil and of good! I'll see if I can find or make a good example of one of those. – Ben Kovitz – 2019-10-07T03:36:25.743
That makes more sense. I wonder, are we just looking for words that are both adjectives and nouns? Often, English has similar adjective/noun combos, eg proud/pride, but also often are suffixes like -ness and -ful, eg earnest/earnestness and powerful/power. Almost all of these can be in your formula "noun preposition adjective", but they aren't actually adjectives. Oddly, the phrase "in short" works, which could equally be said "keeping it short". That doesn't feel poetically emphatic, though. – 6768 – 2019-10-07T03:54:10.257
1@fredsbend I just found a good example with of evil. And I brought up the idea that most of these adjectives also seem well established as nouns. This is much better. Thanks! – Ben Kovitz – 2019-10-07T04:37:58.927
@BenKovitz an aside, but: an English translation of a Hebrew text is perhaps not the best example, especially since there are several published versions. In any case, it would be a good idea to state which translation you're referring to. – Len – 2019-10-07T05:09:21.840
1@Len Thanks, I'll note the translation. It is unusual and might indeed better demonstrate antiptosis in Hebrew. I hope it illustrates some of the range of this figure of speech without luring the OP into thinking that this is how people normally speak and write in English. :) – Ben Kovitz – 2019-10-07T05:19:54.063
"in the red" is an idiom, not an example of antiptosis. You can't say "his account was red" instead of "his account was in the red". – Rosie F – 2019-10-07T09:04:25.663
@RosieF I'm taking "in the red" as both idiom and figure of speech. I assume that most idioms have their origins as figures of speech. But yes, you can't say "his account was red". I think properly the relevant figure of speech for this question is anthimeria, the substituting of one part of speech for another. It looks like I need to downplay the specific figures of speech and just emphasize the notion of 'figure of speech'. Thanks for bringing this up. – Ben Kovitz – 2019-10-07T10:41:08.047
This answer seems wrong: this effect is specific to of, not any preposition. The in the red example is not the same effect at all. – KRyan – 2019-10-07T13:39:31.737
@KRyan Of course, one could also draw the line around "this effect" at the color blue, the sky, large flat things, certain adjectives, etc. This answer says that the example poetically stretches ordinary grammar a little and there is no exact boundary for how far similar stretches can go, following the fish principle. But I think yours is a reasonable opposing theory. Even though this answer got accepted, I hope you will post it. If I think it's useful, I'll give it a +1. Who knows, if you do a great job, you might have a new rule that goes into the next edition of CGEL.
– Ben Kovitz – 2019-10-08T01:18:11.197@KRyan I just saw Lambie's answer: indeed he drew a precise boundary around "this effect" at color. It would be great to see another answer that defines "this effect" as relating only to of and not limited to color. – Ben Kovitz – 2019-10-08T01:28:42.740
@RosieF I updated the text to correct the misuse of antiptosis (!), to explain in the red, and generally to better emphasize the idea of "figure of speech" and its lack of precise rules or boundaries—all to clarify what you pointed out. I think the answer is now much clearer and hopefully more useful. Thanks again! – Ben Kovitz – 2019-10-08T01:53:00.417
I think your answer goes beyond the purview of the question. Also, a sea of blue is not noun preposition adjective. It's noun preposition noun. The adjective blue is transformed into the noun blue. English does not have of + adjectives, in fact. It's always a noun. And all examples show that.... – Lambie – 2019-10-09T18:06:33.410
@Lambie We have some freedom in how we define the purview of the question. I took the question to ask about the grammaticality and ordinariness of moving an adjective into a position where a noun is required. I'm glad we also have your answer, which limits the purview to color but still explains it with figures of speech. I'll see if I can better clarify the grammar without giving the impression that there are strict rules. – Ben Kovitz – 2019-10-09T21:39:45.320