"That's the way the world is. Noma was chosen because she was the best actress for the job. When John told me he had cast her, I said, 'Oh that's fabulous', because I'd seen her in a workshop and she was fabulous."
Rowling added: "I had a bunch of racists telling me that because Hermione 'turned white' - that is, lost colour from her face after a shock - that she must be a white woman, which I have a great deal of difficulty with.
"But I decided not to get too agitated about it and simply state quite firmly that Hermione can be a black woman with my absolute blessing," she said.
The character was portrayed by Emma Watson in the films, while covers of the books have shown Hermione as white. The play, which picks up where the epilogue of the final book left off, with Potter as a middle-aged civil servant, is based on a story of the same name by Rowling, Tiffany and Jack Thorne, the writer of TV drama This Is England '90.
Discussing the process of returning to write about Potter and the wizarding world, Rowling said: "Just because I've stopped on the page doesn't mean my imagination stopped.
"It's like running a very long race," she said. "You can't just stop dead at the finishing line."
While information about the play's plot has been sparse, Rowling did say: "I think that, as a theatrical experience, as a play, it will be unlike anything people have seen before."
Tickets for the play, the most expensive of which had a face value of 65 ($135) per show, were being listed for sale online for close to 800 for both parts.
Harry Potter and the Cursed Child, Parts One and Two, opens at the Palace Theatre on July 30. Previews begin tomorrow.