The simple answer is, "just like you would paint anything else."
However, to my knowledge, mudguards are made of rubber, or a
rubberlike, material, and most paints will not last very long
before beginning to fall off. The only thing I can think of that
MIGHT stick, fairly permanently, are the type of paints used on the
plastic/rubber "bumpers" on later model automobiles. This type of
paint is probably NOT available at your local auto parts store, so
you would have to get it at a paint store that sold automotive
paints. Also, someone at one of these stores, would probably know
what, if anything, would work successfully. Good luck !