All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Muhammad and upon all of his family and companions.
Water must reach the outer skin and the back of nails, as conditioned for the validity of ablution. Moreover, nail polish prevents water from reaching the back of nails, so it will render ablution invalid and prayer as well. Yet, there are some materials such as henna, ink and other dyes that neither form a layer over skin nor invalidate ablution. And Allah knows best.