Massachusetts State Seal

An official website of the Commonwealth of Massachusetts Here's how you know

Official websites use .mass.gov

A .mass.gov website belongs to an official government organization in Massachusetts.

Secure websites use HTTPS

A lock icon or https:// means you've safely connected to the official website. Share sensitive information only on official, secure websites.

What is the difference between Dark Mode and High Contrast Mode?

Computers and mobile devices have "Light Mode" and "Dark Mode" options. These modes switch text between black on white and white on gray. Additionally, most devices have the option for a "High Contrast Mode."

Microsoft Windows 11 has Contrast Themes. These themes allow a user to choose a limited set of colors for their display. This helps people with low vision to better differentiate text, links, and buttons.

When coding a web page, it is important to know that certain elements may not adopt these contrast themes. For example, graphics drawn with CSS or SVGs may not change color. This can make those elements invisible. Custom components that rely on background colors or shadows may not appear properly. Depending on how you use these elements, you may need to use the forced-colors media query.

Be sure to test your web page with a different contrast theme.

Important

The forced-colors media query should not be used to create a custom color palette. It should be used to make small changes to correct an element that is not displaying correctly.

Learn how to turn on contrast themes.

Learn about the forced-colors media query.