Every fish is different and every species can be different, but in general i would say that usually darker colors mean the fish is agitated or showing off in some way. For example i got some rescued acaras this week (tiny 1 and 2 inchers). When relaxed and calm they light colord with faded vertical stripes. When they are fighting with each other or going after food or another aggressive fish the bodies get very dark, the faded stripes get inky black and they even have their tails go from clear yellow to blood red. I would say both the dark JD and the fish with the black stripe that comes and goes are both either upset or trying to show their dominance to another fish. Breeding activity can also produce much more vivid colors, especially on the males but some females too.
Here are a couple pics of the same fish showing different color patterns :
Here is the fish the day i bought it and brought it home :
Here is the fish after a few days with normal colors :
Here is the fish starting to get the darker colors (the vertical stripes get much darker than in this pic , inky black . The firemouth next to it on the left was bothering it and it took on these dark colors instantly, eventually the tail turned red as well.
Here it is with its tail just starting to turn color, it gets the deep red of red wine.
Many things can effect the color that your fish displays, from lighting to substrate color. In general the darker the substrate and background the more vivid the colors of your fish will be and the more they will stand out.
HOpe this helps,
CG