"I have a brown hat."
Translation:Ich habe einen braunen Hut.
Der braune Hut - ein brauner Hut (nominative): Der braune Hut ist schmutzig (dirty). Ein (one or a) brauner Hut ist schmutzig. Accusative case: Ich (nominative) habe einen braunen Hut (accusative). Ich habe den braunen Hut. The articles die, das, eine, the neuter 'ein' and a follwing adjective don't change in the accusative. Das braune Kleid (dress), ich habe das braune Kleid. Ein braunes Kleid, ich habe ein braunes Kleid. Die braune Hose (is singular but means trousers), ich habe die braune Hose. Eine braune Hose, ich habe eine braune Hose.
Ich habe einen braunen Hut is correct.
Did you get the gender wrong, perhaps, and type eine braune Hut? Then the system might have thought that you were aiming for eine braune Mütze -- Mütze is feminine but Hut is masculine.
(At least when it refers to the article of clothing. There's also a feminine word die Hut but it's less common and has nothing to do with clothing.)
Remember that Hut is masculine, so you would have to use einen braunen Hut in the accusative case.
What was the entire sentence that you typed? I'm sure you didn't just answer with the word Hut by itself.
Please, always ask about entire sentences -- often, the problem is not with an individual word but with the combination of words (for example, both "you" and "is" are words in English but the combination "you is" would be wrong) or with word order.
Mütze is generally a hat without a brim, or just with a visor on the front.
Which part of the sentence would you expect to be in the genitive case, and why?
(If you saw this sentence while practising a genitive unit: that's probably because Duo occasionally likes to add a sentence or two from other units while you're practising, perhaps to mix things up a bit. The sentence "belongs" to the Colours unit.)
Because it's wrong.
haben (to have) is a transitive verb that takes a direct object in the accusative case.
Attributive adjectives (before a noun) have to have an ending (so braun is definitely wrong here, since it has no ending).
Nouns are capitalised in German (so hut is definitely wrong).
Hut is a masculine noun, so you need the masculine accusative einen before it, not ein (which could be masculine nominative or neuter nominative/accusative but not masculine accusative).
And the adjective ending has to be -en here for masculine nominative after the indefinite article.
Thus it has to be Ich habe einen braunen Hut.