You can access the just-executed command line with the history built-in. (I have no idea why history 1 prints the just-executed command line but fc -nl -1 prints the previous commmand, as does fc -nl 0.)
PROMPT_COMMAND='echo -en "\033[38;5;2m"; history 1; echo -en "\033[0m\n"'
This prints a number before the command text. Here's a version that removes the number. (It may be incorrect if you go beyond 99999 history lines, I don't know how bash formats the number then.)
prompt_function () {
local prompt_history="$(history 1)"
prompt_history=${prompt_history:7}
echo -En $'\033[38;5;2m'"$prompt_history"$'\033[0m\n'
}
PROMPT_COMMAND=prompt_function
(Note that echo -en ..."$prompt_history"... would expand backslashes in the command line, hence my avoidance ofso I use echo -eE and let the shell expansion generate the control characters with $''.).