0
votes

I want to know what color is used for text field placeholder. I have project that use default text field with default placeholder in many times. Also i need to implement UI elements that use custom placeholder label. Unfortunately, i can't find any information about color specification of UITextField placeholder.

Can someone provide RGB or HEX value for this? Thanks.

2
Take a screenshot and then use a color picker to determine the color.rmaddy
@rmaddy i tried to but not success.Evgeniy Kleban

2 Answers

1
votes

Xcode can pick color from editor #_#

the color is very closed to Magnesium in Crayons panel of color picker, hex is C7C7CD, Magnesium is C0C0C0, I like regular number, suggest you use C0C0C0 instead, really the same

4
votes

The attributedPlaceholder property of UITextField is a NSAttributedString. Querying this string's .foregroundColor attribute yields UIExtendedSRGBColorSpace 0 0 0.0980392 0.22.

So the color seems to be:

let color = UIColor(red: 0, green: 0, blue: 0.0980392, alpha: 0.22)