AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Css dark mode switch12/5/2023 The darkest values of our colors were indistinguishable from each other and black. We needed an algorithm that would provide colors that still read as their primary hue at the lightest and darkest values, allowing us to build components from these color values. When applying and to a background, these colors were indistinguishable from black and each other. We had trouble at the darker end of the spectrum for each color. The original lightest yellow was indistinguishable from white, and the darkest yellow indistinguishable from black. With some colors, the lightest value was too close to white, while others the lightest value was much too dark. At the light end of the spectrum our reds and yellows weren’t as usable as I’d liked. First, I needed to solve some of the color issues the design system inherited in light mode. Choosing a better algorithmĪfter picking a lighter background for dark mode, I could then explore the color scale in a deeper manner. Starting with a mockup allowed us to define an aesthetic goal first, regardless of technical requirements. Reducing the overall contrast was key to preserving depth in our interface, allowing elements to cast shadows, and displaying the full spectrum of colors. I could design what Stack Overflow ought to look like without concern for how the original color values would map. We'd have to do better than this Starting with the mockupĪfter just diving in technically proved to be a false start, I instead chose colors by hand in my design tool of choice Figma. Pay close attention to the darkest value of red against the black background. This approach made everything have unusable contrast, and fell into the traps of what I dislike about dark modes in general. With this approach, became with the values in the middle staying pretty much the same. In my first explorations of what Stack Overflow would look like in dark mode, I wanted to simply test swapping the white background for black, and reversing the color scales. This would lead us to a color scale represented by through with 10% steps in between. Then we’d tint to lighten a few times 10%) at the other end of the spectrum. For example, we’d define a Less variable, and darken it by 10% a few times using 10%). When building our product’s original color scales, we-perhaps naively-took a single color value and modified it using Less color transformations. We could give our users dark mode and offer future accessibility modes for free? By solving everything along the way to dark mode, Stack Overflow would modernize its front-end codebase, enable accessibility-conscious theming, and push for adoption of our design system. The work I’m about to talk about was never about dark mode specifically, even though countless users asked for it. Things that are hard to manage on light screens like simultaneous contrast is even harder to manage against dark backgrounds.īut here I am, the guy who finally shipped dark mode on Stack Overflow. Light text on dark backgrounds is fatiguing to my eyes. It’s even harder to introduce depth with shadows and other visual cues. It’s hard to use the full spectrum of colors to express your interface. I often find the usable contrast to be way too low. I don’t actually prefer dark user interfaces. I help design all the interface components that get assembled into new features.įirst, a bit of irony. I’m Aaron Shekey, Stack Overflow’s principal product designer on design systems. Let’s talk about the work that went into it. On March 30, 2020, we enabled folks to opt into a beta dark mode on Stack Overflow.
0 Comments
Read More
Leave a Reply. |