If your guess word contains multiples of the same letter, the color rules are slightly different. For example if you guess SHEET and one E becomes green and the other black, then there is only one E in the secret word and you found it. But if one E becomes green and the other yellow, then there are (at least) 2 copies of the letter E, but not in the yellow location. If one is yellow and one is black, you know there is exactly one E but not in either of your guessed locations.
In Hard Mode, once you have found a green letter, subsequent guesses must use that letter in that position. Similarly yellow letters must be used in each subsequent guess though not necessarily in the same location.
At the conclusion of the game, the background color of each square in the 6 by 5 grid is either black, yellow, green, or clear for any unused guesses.
For Wordle Hard Mode, considering only the background colors, how many color patterns are possible once the game is over?
Break down your answer into groups of games won in 1 guess, in 2 guesses, ... , in 6 guesses, and finally games lost (in which the 6th guess was still not the secret word).