Raymond Chandler was the author of a 1938/1945 Philip Marlowe short story called The King In Yellow. Many of his stories are set in Bay City (for Santa Monica). It would seem that the confusion over the dating is due to the story originally having been published with Steve Grayce as the detective, only for his name to be replaced with Philip Marlowe when it was republished (click here for more on this, in the introductory paragraph of 'short stories').
The King In YellowEdit
The King In Yellow involved a house detective in a fancy hotel (Grayce/Marlowe) who discovers famous jazz trumpeter King Leopardi dead in his bed in yellow pyjamas (although it seems yellow is his trademark colour, his actual pyjamas had been swapped for others). The pyjamas and name cause the detective to mutter "The king in yellow" as he remembers a book he once read (inferred to be Chambers' book, but it could equally mean the dread play itself).