Firstly, to start learning how to paint a door, you should begin from behind the door before opening it out to allow you to reach the rest of the doorframe.
Start by painting along the top.
And then moving down along the sides, working your way round from the outer edge, as this will ensure a beautiful finish.
If a door lies between two rooms of different colours, the edge and the portion of the doorframe that it lines up with should be the same colour as the room it opens into. The face of the doorframe, on the other hand, should be painted the colour of the room on the outside.