When the noun is nominative (i.e. the subject of the sentence, or when standing alone and by itself as "The black cat" is), and you are using 'der, die, das' to indicate the gender, then the adjective has '-e' as its ending. I was told to consider 'der, die, das' as being "strong identifiers" (proper term is "definate articles", and the adjectives that follow them are "weak" and take a "subordinate" ending.
If the phrase was 'A black dress', the translation would be 'Ein schwarzes Kleid'- 'ein' is a "weak identifier" (as I was told; "indefinate article"), so the adjective would take the declination to indicate the gender of the noun.
A good table is posted in the tips for this section, if you have the website version available. https://www.duolingo.com/skill/de/Colors/tips-and-notes
Hope this helps!