I don’t think you can just paint them but maybe. I’ve seen keyboard stickers, but I’m not sure how durable they are. The actual fix is to replace the key caps.
If you have anything on your hands that contains oil, it can damage the keys. Like eating, french fries while touching your keyboard.
If it’s an older MacBook, it may not be worth the trouble. If you know your keyboard by heart, you could just ignore it.