Oil and solvent based paints do tend to yellow over time and the usual remedy is to use a water-based paint instead. However, for a fireplace this may not be possible since you also need to use a heat-resistant coating and these are usually solvent based.
I would, therefore, suggest using the best quality heat-resistant enamel you can (in other words, usually the most expensive) because the quality of the resin and pigments will help ensure the yellowing process is less prevalent than with cheaper alternatives.