In season 1, episode 2 of True Detective, Detective Rustin Cohle reads Dora Lange's diary, and the phrases, "The Yellow King" and "Carcosa" stand out.
What do these phrases mean?
Do they have context outside of True Detective?
The King in Yellow is a book of short stories by Robert W. Chambers, first published in 1895:
There are 10 stories, the first four of which, "The Repairer of Reputations", "The Mask", "In the Court of the Dragon" and "The Yellow Sign", mention The King in Yellow, a forbidden play which induces despair or madness in those who read it.
The city of Carcosa is referenced in the forbidden play.
The descriptions given of it make it clear that it must be located on another planet, or possibly even in another universe.
In the Cthulhu Mythos,
the King in Yellow is an Avatar of Hastur, so named because of his appearance as a thin, floating man covered in tattered yellow robes.