You cannot judge by the color. You need electrical experience and a voltage tester.
For the fan black and blue probably should be hot wires. White should be a neutral. Green is probably a ground.
For the house, the red/black probably is hot. The white is probably neutral, and the copper should be ground.
But who knows? I have seen enough installations where these are all mixed up. Especially when 3 way switches are involved.
Don't get hurt. Get someone experienced to help you.
© 2017 Renovate Your World LLC