danny's skin color doesn't change when he's a ghost, he just becomes backlit. his aura illuminates him from behind. if you sample the color of the border on his skin, it's the same as the base color when he's in neutral lighting.
It’s close. Really, really close, but not quite.
Even the lighter parts of Phantom’s skin are slightly darker than Fenton’s.
We do have episodes where his skin is the same color in both forms and episodes where they leave out the glow, but those are mostly in early episodes, and forgetting the glow is unlikely to be more than an animation error. I mean, Tucker has purple lips at one point in Pirate Radio and Sam sometimes has pupils.
I actually agree that the backlighting explanation makes the most sense, and is probably what I’d go with, but we can’t really say it’s definite since this isn’t a cartoon that keeps things consistent all the time.
No cartoon is. Even Steven Universe has noticeable details that can tell you which artist worked on which scene. They’ve made posts about it. With several people working on a cartoon, there are always going to be inconsistencies.