A few months ago, we let you all know that in order to progress our goal of being more accessible, we would need to redefine our colors within our design system, Stacks.
Before I walk you through the changes that we are looking to make, I want to thank the community for all your input. We found the input valuable and it directly affected some of the decisions we made, like using APCA to measure our contrast.
Proposed Changes
When creating the new color palettes, we aimed to solve a number of problems. First, we wanted to be more accessible, but we wanted to do this without hindering usability. A lot of people questioned this in my previous post. The best example I can give is when we updated the post summary to use an “accessible” green from our existing palette, it became harder to scan for answered questions. There was simply not enough saturation in our existing palette at these darker values to create the contrast we needed in order for our users to be able to scan quickly. Thanks to the community’s suggestion, we believe we have been able to accomplish this by using APCA to guide our decisions. APCA generates a lightness contrast value that is perceptually uniform. This means that regardless of how light or dark the two colors are, something with a rating of Lc 60 will have the same perceived readability, which is not the case for WCAG 2.
Another problem we wanted to address was the inconsistencies across the site. Now I will admit right here that this will not fix all inconsistencies, but reducing the amount of colors in the palette will help create a more cohesive experience. This includes the removal of the “powder” color from our palette. Powder was added to our palette originally to be inclusive of the Stack Exchange beta theme. Since the creation of Stacks, theming was created and released and the inclusion of this color within the palette is no longer needed. Powder and blue will be replaced with one new blue palette. With Stack Exchange and the beta themes in mind, it is the only theme whose primary color we did alter in this exercise.
Lastly, there were technical issues we wanted to solve, like ensuring all colors of the same level could be used for the same purpose. This has been the cause of most of our dark-mode defects and the cause of a lot of unnecessary code. An example of this would be if black-700 could be used for text in light mode, but not dark mode. We would then need to go in and add an additional class to override the color in dark mode for an optimal contrast, but we believe this should just be inherent to the system itself.
New Color Palettes
I’m sharing the color mapping palette with you, so you can see the relationship between the existing colors and the new colors. Below, you’ll find a snippet of the palette with number annotations and what those areas represent on the palette.
- The numbers 0 through 900 represent the current numbering system of our colors.
- The “Foreground” and “Background” labels are used to show the purpose of the colors, as in whether they should be used for the foreground or the background.
- These labels give even more purpose to the colors giving you an idea of how they will be used around the site(s).
- The top row represents the new palette; the bottom row represents the existing palette.
- An x means that a color does not exist at this stop. This was mostly used to map the current palette against itself.
Below, you’ll find our new palettes:
As you can see, there is a reduction in the number of colors. This is intended to reduce the number of color inconsistencies across the site caused by designers choosing different but similar colors. You will see the biggest reduction happens in the foreground colors. A reason the reduction isn’t as great in background colors is because we need to support backgrounds, borders, and borders on backgrounds. Additionally, our Teams product, who also uses these palettes, uses a gray background, unlike SO and SE who use white, therefore they need more grays.
We also heard you speak about color issues regarding badges/awards and have added an additional stop to give designers and developers more options when working with these elements.
Key takeaways:
Both of these palettes pass APCA standard
High contrast palettes pass WCAG 2.1 AAA standard
Number of colors has reduced across the board except in the award palette where we have added additional background colors.
Next you’ll see where we mapped the general usage guidelines for the new palette and how they map to type and background hierarchy. This format also gives guidance to the designers on what color combinations they can use to ensure accessible, consistent use.
Component changes – buttons
There aren’t many components that will be changing outside of the colors that they inherit, but buttons are one of them. Dark mode buttons are actually using a third blue (not pictured in the palettes above). With our new buttons, they’ll be using the same blue that the links are using. We’ve also taken this opportunity to remove the shadows in our recent effort to reduce visual clutter. Rounded corners are typically seen as being more friendly and safe, so we have also taken the opportunity to increase the border radius on our buttons from 3px to 6px.
Examples
Below, you’ll find examples of what the pages will look like with the new colors in light mode and dark mode, if applicable. (Since there are a lot of examples, we've resized the images below. Click on an image to view it at full size.)
Meta Stack Exchange
Meta Stack Exchange will be keeping the theme intact, so changes are small.
Stack Exchange beta sites – user profile
The beta theme is the only “theme” changing. It will be replaced by the new default blue.
Stack Overflow – Questions list
SO – Ask Question Wizard
SO – Staging Ground
SO – Moderator History
SO – Collectives – Actions for you
You’ll also find high-contrast light and dark mode mocked up below.
What isn’t changing
In order to ensure alignment, I want to call out a number of things that are out of scope for this project:
- We will not be updating any individual site themes
- We will not be changing the colors of certain UI elements that may seem inconsistent. This is because of scope, not because “we believe the notification indicator should be red while others are blue”.
- We will not be updating pages that do not currently use the Stacks design system (e.g., the Stack Exchange landing page and chat pages)
- No logos are changing
Next steps
We really appreciate you taking the time to see what we are working on. We are interested in hearing your thoughts especially around the changes in dark mode. APCA restricts the use of saturation in dark mode—how do you feel about the muted palette?
Please share your feedback in an answer below.
Although the colors have been defined, when you put colors to use, things can change—and the next time we share, things may look different. For now, we will work your feedback into the palette. Then we will start moving these colors into the design system which will take us into at least August. After that, we will work to align legacy colors against the new colors to ensure a smooth experience on the site. We aren’t sure how long this will take, but we’ll update you as we know.
Update (July 6): Changes made
Thank you to everyone for your feedback. The Stacks team is starting work soon, so I wanted to follow up with the changes that we have made based on your feedback.
We have put in a PR to fix the link visited state. This solution will simply be a darker blue. We may have a different approach when the new colors are implemented, so please share your feedback when the fix goes out.
Here is a list of changes made to the color palette:
- Desaturated light-mode middle blue
- Desaturated light-mode greens
- Altered the hue of the green to make it slightly more blue
- Darkened and desaturated yellows in dark-mode
- Aligned saturation and brightness of background and border dark-mode colors
I want to give a quick note on that last point. We worked to align these, but ultimately what we prioritized was the contrast number coming back from our APCA calculator. So if we gave green a saturation of 40 and brightness of 50, but the APCA contrast was 35 when blues was 25 with the same saturation and brightness, we needed to reduce the saturation/brightness of green to align with the rest of the colors in that same level.
You can view the updated palettes and updated Stack Overflow mock-ups below.
Updated palettes
Updated Stack Overflow mock-ups
Update (July 24)
To circle back on some of these items, we wanted to let you know that the following items have been successfully updated:
- New buttons
- Border radius
- Visited anchor colors
You can see the complete list of updates in the Stacks release notes.