Disclosed are ophthalmic devices configured to be implanted in an eye of a patient. In one embodiment, the ophthalmic device includes a mask configured to increase the depth of focus of the patient and comprising a highly fluorinated polymeric material in which the number of carbon-fluorine bonds equals or exceeds the number of carbon-hydrogen bonds in the highly fluorinated polymeric material. The highly fluorinated polymeric material can be resistant to degradation upon exposure to ultraviolet light. The mask further includes an aperture configured to transmit light and a portion configured to be substantially opaque to visible light and to surround at least a portion of the aperture.