What is the best contrasting colors for text and background?

What is the best contrasting colors for text and background?

Contrast with a White Background. Black text on a white background provides maximal value contrast and, therefore, optimal readability for body text. Black text on a white background provides maximal value contrast and, therefore, optimal readability for body text.

What color is a high contrast background?

You usually want a high contrast between text and its background color. But too high contrast between design elements might give an unsettled and messy impression. Black and white create the highest contrast possible.

What is the best font color for white background?

black
White backgrounds: Simple and classic, black text on a white background provides the highest readability ratio. Blues and grays also provide the right contrast and thus work well on white backgrounds.

What should the contrast be between text and background?

Unlike the varying saturation, here a vast majority of the ratios get above 7 (the thin circles). You should choose the text color such that success criterion 1.4.3, Contrast (Minimum), of WCAG is met.

How to pick background color depending on font color to have?

Ramhound’s soulution completely fails for colors having each component near the value 128 (not all gray as suggested) – then you get almost the same color! That text visibility on given background is allways best, but not allways nice.

Which is the correct formula for the contrast ratio?

The contrast ratio is calculated as (L1 + 0.05) / (L2 + 0.05), where L1 is the: relative luminance of the lighter of the colors, and L2 is the relative luminance of the darker of the colors.

Which is the Best Background color for text?

That text visibility on given background is allways best, but not allways nice. In case you do not want to disturbe by crazy colors you just end up using black/white suggested by accepted answer.