I remember painting some mdf last year and it did the same thing just dissapeared in 10 mins haha, if you paint it enough times it will eventually go the same colour as the flat surface, I think I painted mine about 6/7 times
aah, this old chestnut. a common problem with MDF.
firstly use a decent paint system - absolutely forget the special MDF paints they are mostly useless in my experience.
use a water based wood primer - i'd recommend Dulux Trade - two coats, followed by two coats of Dulux Trade undercoat.
leave it for a day or two. if the paint begins to yellow apply a stain block such as Zinsser. i have found their shellac-based primer to be the best at preventing MDF yellowing. leave to dry then apply your finish.
i did this with my alcove bookshelving two years ago - i'm looking at them right now and they are as white as they day they were done :)
We had an MDF shelf cut along its edge into a 'wavy' design. We bought an MDF sealant from an ordinary DiY store, put 2 or 3 good coats of this along the cut 'wavy' edge so the top coats of paint could not be absorbed into the MDF.
Brilliant, worked a treat. Painting it no probs, the paint didn't sink into the edge and it still looks great 18 months later.