For example, I'd like to change the color "52" found in this chart to a much darker red.
Just to be clear, I'm not looking for a way to create a color theme. I want to redefine the underlining color that are mapped to the standard 256 colors.
I don't think you can change those mappings as a part of iTerm or Terminal configuration.