Ask questions and get answers from experienced industry professionals
Unfortunately, you really can't paint over Thermofoil. If you don't want to replace all of the cabinets, we usually suggest replacing just the doors and drawer fronts. Those are done in Thermofoil, but the cabinet boxes and faceframes are painted wood, which can be repainted. The new doors and drawer fronts could be painted any color you like, and the cabinet boxes can be done to match. This would give your kitchen a whole new look.
Some of our local painters have had success painting over thermafoil. Make sure you rough up the fronts a bit with a fine grit sandpaper which will help the paint adhere. Talk to your local paint store about the best primer and top coat to use on your material. It might be helpful to actually take a door or drawer front into the paint store. Good luck!
I don't recommend painting Thremafoil. You should just consider change out the doors and drawer fronts.
Painting over thermo foil will not be a long term solution. It is a smooth non-porus material. Your best bet is to replace the doors. There are lots of options today that weren't available a few years back. If you want to paint, you can order raw mdf doors and have them painted to match the cabinets.