1

I start my adventure as a front end developer and I wonder about the easiest way to choose the color groups used in css for my projects. For example, I have a group of grayscale colors. How large should the "distances" between them be (assuming that they are placed on top of each other eg text on the background) to ensure good visibility? Is there any universal method to determine this?

1 Answer 1

0

You can check the contrast ratio between the colors. According to WCAG, the minimum contrast ratio for text and background should be 4.5:1, except for large text, where it can be 3:1. This will improve accessibility and make sure people can read the text on your page.

You can test the contrast ratio from your color on this page: https://contrast-ratio.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.