I saw on this page that the infobox section header and title have a different colour. And I want to have the same colour on my infobox on my wiki. A friend told me that it’s very complex code, so could I have the code or wiki text for it?
However, type isn't suitable for your purpose. It's suitable if there's only one styling that needs to be applied to infobox, but you're trying to have multiple variable stylings (different header backgrounds for different characters). You should use theme-source for this.
To implement and use that, you'll have to do following: