Table of contents

Choose a placeholder color by comparing it with the background inside the input field, then check that the pair provides sufficient contrast for the text size. If the result falls short, adjust the text color or the field background and check the new pair. Repeat that process wherever the field uses a different background, including dark mode.
Color is only one part of a usable field. Placeholder text disappears when someone types, so keep the field’s label visible and put essential instructions somewhere that remains available. Review the empty field, the field while it has focus, and the field after a value has been entered. This helps you judge whether the color works in the context where a person actually needs to read it.
Start with the field and its background
The background to use for your decision is the one directly behind the placeholder text. A field may sit on a page with a different surrounding color, so looking at the page as a whole can lead you to check the wrong pair. Start with the empty field and identify the text color and the input background used in that state.
If you have access to the field’s color settings, note both values. If you are working from a design or another person’s implementation, ask for the values or use an available way to identify them. A color picker may help you identify a color, but check its instructions to understand what it can select and how it reports the result. Keep the two values together so you know which text color belongs to which background.
Choose a candidate
Select a text color that is distinct enough from the field background to read comfortably, then plan to check the pair. Text that is too similar in color to its background can be difficult for people with low vision to read. A subtle appearance may be a visual goal, but it should not come at the expense of being able to read the prompt.
For example, imagine an empty field with a pale background and a very pale placeholder. You could try a darker candidate and compare that candidate with the same field background. If the background itself changes, treat the combination as a new pair and check it again. The same approach applies to a dark field: start with its actual background and select a candidate that stands out against it.
Make a short record of the field, its background, the candidate placeholder color, and the state you inspected. This becomes useful when the same field appears in more than one setting. You do not need to settle the final color by eye at this stage; the next step is to check the pair against the relevant contrast guidance.
Check and adjust the contrast
Compare the candidate placeholder color with the input background using a contrast checker or another appropriate method. Have the two actual color values ready and consult the checker’s guidance for how to supply them and interpret its result. Text contrast guidance also applies to placeholder attributes, so include the placeholder in your review rather than treating it as an exception.
Use the result together with the guidance relevant to your text size. If you are unsure which guidance applies, check the applicable standard or ask the person responsible for accessibility before accepting the color. Section508.gov’s guidance on accessible color use is one place to begin. The important decision is whether this particular text and background pair meets the requirement that applies to it; an attractive palette alone does not answer that question.
If the pair needs adjustment
Change one part of the pair and check it again. On a light background, for example, you might try a darker placeholder. On a dark background, you might try a lighter one. If you can change the field background instead, consider a background that gives the text more separation. Each time you make a change, compare the new combination rather than assuming that the adjustment was enough.
Keep the surrounding design in view while you make that decision. A revised color should be usable in the actual field, and the label, entered value, and any hint should still be clear in their own contexts. If changing the background affects those other elements, review their contrast as well. Avoid choosing a placeholder color solely because it looks different from the entered value; it still needs to be readable against the background.
A simple comparison can keep the decision organized:
| Item to check | Question to answer |
|---|---|
| Placeholder color | Is this the value used by the empty field? |
| Input background | Is this the color directly behind the text in that state? |
| Text size | Which contrast guidance applies to this text? |
| Result | Does this pair meet the applicable guidance, or does it need another adjustment? |
Record the accepted pair along with the context in which you checked it. If someone later changes either color or the text size, revisit the decision. This makes it easier to tell whether an earlier result still applies.
Keep labels and instructions available
A readable placeholder can offer a brief example or prompt, but it cannot replace a persistent label. Once a person types a value, the placeholder disappears. Without a label that remains available, the person may have to clear their answer or search elsewhere to remember what the field is asking for.
Give the field a meaningful label that stays available after entry. For example, a field labeled “Email address” can remain understandable when it is empty and after someone has typed an address. If you choose to include an example inside the field, treat it as supplementary to that label, not as the only identification for the field.
Decide what belongs outside the field
Put essential instructions in separate text that remains available as the person completes the field. This is useful when someone needs a particular detail in order to answer correctly or check what they entered. A short hint beside the label or field can carry that information without depending on the placeholder remaining visible.
Consider these questions as you write the field’s text:
- Can someone identify what the field asks for after entering a value?
- Will they still have the instructions needed to complete or review it?
- Does an example clarify the request, or could it be mistaken for an answer already provided?
- If there is an error message, does its wording explain the issue without relying on color alone?
For a practical review, first read the empty field as a person encountering it for the first time. Then enter an example value and read the field again. Check whether its label and any essential hint are still understandable. If an error can appear, review the wording of that message too: a person should be able to understand what needs attention without having to interpret a color change on its own.
Keep hints concise and relevant to the decision the person must make. If the label and a separate instruction already explain the field clearly, consider whether a placeholder adds anything useful. You can find further field guidance in the CMS Design System.
Review the result in context
A color pair is only useful if it matches the field people encounter. Review each background on which the placeholder appears, including dark mode where it is available. A color that works against one background needs a separate check against another; use the actual colors for each combination.
Start with the empty field in its ordinary appearance. Then move focus to it and inspect the placeholder again. If focusing changes the background or placeholder color, check that combination separately. Enter a value and confirm that the label and essential instructions remain available. If the field has an error state, review that state as well, including the wording of any message and the colors used for its text and background.
Make a small review matrix
You can use a short list to avoid overlooking a version of the field:
- Empty field: Note the placeholder color, background, and text size; check the pair.
- Focused field: Identify any changed colors and check any new pair.
- Field with a value: Confirm that the label and necessary guidance remain available.
- Error state: Check that the message explains the problem without relying on color alone, and review its readability.
- Alternate backgrounds or dark mode: Repeat the checks for the combinations that actually appear.
If several fields share a color choice, look at the contexts where they appear before applying one result to all of them. A field on a different input background may need a different placeholder color. Likewise, if the field’s appearance changes when focused, the empty and focused states may need separate entries in your notes.
Finish by asking someone reviewing the field to identify its purpose, follow any instruction, and understand an error from the text provided. Their feedback can reveal wording that needs work alongside the color review. Keep the final color values and checked contexts with your notes so the choice can be revisited when the design changes.