[HN Gopher] Building dark mode on Stack Overflow ___________________________________________________________________ Building dark mode on Stack Overflow Author : lobo_tuerto Score : 35 points Date : 2020-04-04 06:42 UTC (16 hours ago) (HTM) web link (stackoverflow.blog) (TXT) w3m dump (stackoverflow.blog) | butz wrote: | Great, now every visit from private mode shows huge "dark mode" | banner. How about just using prefers-color-scheme media query? | BubRoss wrote: | I'm not sure choosing a color scheme for your CSS is really | 'building' anything. | userbinator wrote: | I remember using a forum software on a site long ago (around | the late 90s/early 2000s timeframe) where one of the options in | the user preferences page let you adjust the colours of various | things --- and not as in "pick from these limited choices", but | as in "enter the CSS colour value, either a name or #hex", and | I believe it saved them for every user since you'd only see | them when logged in. Does anyone else remember what that could | be? | arkitaip wrote: | It could be a major undertaking for a sufficiently complex site | like Stackoverflow, just like the article illustrates, because | there just so many UI elements to re-color. | BubRoss wrote: | Thinking that choosing colors is a major undertaking is one | of the most preposterous things I've read in here in a long | time. Everything in this article should take a morning at | most. People need to stop pretending trivial things are | difficult just because they want to write a blog post. | shakermakr wrote: | When you have your OS set to dark mode and a site blinds you with | it's whiteness...you see the total UX fail. UX is about the U. If | they've specified I want things black on contrast, then support | it. Because they expect it. Post shows how feasible it is...and | users, the U, will respect you for it and keep coming back. | | Otherwise your first impression is simply _blinding_ and not in a | positive way | arkitaip wrote: | This literally happened as I switched from TFA to this HN | post... | megavolcano wrote: | Dark Reader extension does a better job than their design, what a | waste of time, effort and cash. | musicale wrote: | Rearranging the deck chairs won't save stackoverflow.com. | why-oh-why wrote: | If you think StackOverflow needs to be "saved" you're deathly | mistaken. | | Just because some complain about it it doesn't mean that it's | failing. | FpUser wrote: | I can not digest dark mode when working with the text. I know it | is individual as I saw that many programmers do use it. To each | their own I guess. | ucarion wrote: | The article mentions they use Bezier curves over the HSB | colorspace. | | > I used Lyft's amazing Colorbox to help normalize our colors. | Instead of a naive linear scale at 10% increments, I used bezier | curves--a vast improvement at the more extreme ends of the scale. | | Linear HSB is _very naive_ , but HSB is still _quite_ naive. It | 's just a cylindrical version of a color space optimized for | displays, not human perception. | | I don't understand why they wouldn't instead opt for the CIELAB | color space, or its cylindrical equivalent. IBM does this, and it | gives them effortless support for dark mode, by just flipping the | luminance component of colors: | | https://www.ibm.com/design/language/color | | You can visualize the CIELAB behind IBM's color scheme here: | | https://cielab.io/ (go to "IBM Carbon") | ssivark wrote: | I think site/application-specific _toggling_ of dark mode is a | fundamentally broken idea, since the default on the web is white | background pages. It's an awful experience to turn up the | brightness when viewing dark pages, when most pages you open will | be white by default! Ideally, all portals must support theming | modes, but I'd like the switching to be seamless, to prevent such | nasty surprises. Maybe based on a standard (something like the | site delivers both CSS sets, and logic in the browser chooses | which ones to display, or suitably "invert" the default) | saagarjha wrote: | You're thinking of prefers-color-scheme, which already exists | and is adopted by Stack Overflow. | ssivark wrote: | My question is this: Why would I use dark mode on SO, or | specific sites, if the next site I open will be rendered with | the light theme with high probability? | dreamcompiler wrote: | This is a good article. I'll bookmark it and probably refer to it | in future. | | That said, why does everybody care about Dark Mode so much these | days? It's an interesting problem; I worked on it 20 years ago | and solved it adequately for my own purposes. But it's not a very | _important_ problem, especially right now. | sqs wrote: | Dark mode is much more readable for many people. That's why it | matters. In my opinion as a user, it's as much of an | improvement as going from a UI with tiny fonts to one with | legible text sizes. And once most sites and apps you use have a | dark theme, the ones that don't become even more jarring and | noticeable. | beders wrote: | It is comical we are getting excited about a bunch of CSS files | and other assets. | | As others have pointed out: Desktop apps never had this problem | and decent operating systems gave you much more freedom to adjust | the color style to your liking. | | Now we have half-assed solutions running in a hypertext display | engine. Amazing! ;) | noahtallen wrote: | IIRC, Windows and macOS only offered built in dark mode in the | system UI components until the last year or two, and definitely | don't offer much color customization freedom... except for the | global highlight or accent color | [deleted] | userbinator wrote: | It used to be far more customisable for Windows; this is | Windows 2.03: | | https://guidebookgallery.org/pics/gui/settings/appearance/wi. | .. | | 3.11: | | https://guidebookgallery.org/pics/gui/settings/appearance/wi. | .. | | 95: | | https://guidebookgallery.org/pics/gui/settings/appearance/wi. | .. | | ...and that dialog remained almost unchanged up until Windows | 7: | | https://www.dedoimedo.com/images/computers_new_2/windows-7-s. | .. | | Unfortunately, after Win7 it was removed, and they basically | took away customisation completely in Win10. | noisem4ker wrote: | What's left of customization is the choice of an "accent | color", plus light and dark modes. | ken wrote: | Mac OS had themes (briefly) back in 1998 [1]. Linux (GTK+ and | Qt) still do. Windows has supported custom fonts/colors since | at least 1992, even if the result wasn't always tasteful [2]. | | [1]: | https://www.blakespot.com/mac/Images/Gallerypix/drawing2.jpg | [2]: https://blog.codinghorror.com/a-tribute-to-the- | windows-31-ho... | grecy wrote: | > _It is comical we are getting excited about a bunch of CSS | files and other assets_ | | Especially on a site like stack overflow when there are | literally 10,000 other things they need to improve that would | be appreciated more. | JadeNB wrote: | That's the SO way, though--there's so much they need to fix | and won't or can't, that they need to distract from their | user-hostility by making a fuss over whatever small user- | positive things they _do_ do. | nikivi wrote: | Hope GitHub is next to release dark mode | userbinator wrote: | As someone who really _really_ hates the "reduce contrast" | trend, I personally thought the screenshot labeled "have to do | better than this" was the most readable. The one after that just | looks faded. | | Then again, I also find it funny that "dark mode" is heralded as | something revolutionary, when long ago people could customise UIs | far more. You can still do that with userstyles, another thing | that seems to have gotten mostly ignored these days... | dreamcompiler wrote: | 100 years from now, 2020 will be remembered for three things: | Covid-19, the general public spending all their time talking | about Tiger King, and every programmer spending all their time | talking about Dark Mode. | | Perhaps these things are not unconnected. | zzo38computer wrote: | I agree, I prefer the high contrast too. I also agree about | customization, I would suggest using proper CSS classes and | HTML and so on in order to allow better user customization with | user styles and stuff like that, rather than relying on the | service provider. Web pages without CSS can use the settings | (for colours, font sizes, etc) specified by the user, so | someone should not complain about the lack of CSS, and more so | too you should not use CSS too much on web pages I think. (But | if you do, ensure you do not do it wrong; if you set the | foreground colour you must also set the background colour and | vice versa. But don't specify colours at all unless you need to | use multiple colours in your document.) | thaumasiotes wrote: | > I personally thought the screenshot labeled "have to do | better than this" was the most readable. The one after that | just looks faded. | | Hm. I like the "better" one more. However, it's cheating -- the | first screenshot displays a lot of white text in the filters | and the text of the questions. The text of the questions is | most of what I find off-putting about the first screenshot. | | The second screenshot displays no white text at all. The | filters menu isn't visible. The text of the questions isn't | visible. Text that's gray in the second screenshot is also gray | in the first screenshot. | | What kind of comparison is this? | sdegutis wrote: | I very much miss the system theming of Windows XP era. Sure it | often looked like crap but sometimes it was great too. Maybe | it's just nostalgia though. But I guess we still have that with | desktop Linux...... for the trade offs. | endorphone wrote: | I don't think anyone heralded it as revolutionary. It's an | affordance to the reality that it's a different experience | using devices in darkness than in brightness. Mobile screens | make dark situations more prevalent. | | As to UI customization, often that was an inconvenient cop out | not a great enabler. "We don't want to figure this out so just | change things yourself, but then you'll switch PCs or reinstall | and you'll lose all of those customizations and you'll never do | it again and you will forever leave everything vanilla". | | Is it worth websites making a big deal about? No, not really... | At most it should put a little badge when it detects the dark | mode CSS allowing unwilling users to disable it, but it doesn't | seem like something that gets dragged on as long as it has by a | couple of sites. | blt wrote: | I agree - it has a nice high contrast and I didn't really see | any significant flaws. | dehrmann wrote: | I find it funny that it's pitched as helping eye strain and | readability when a light background dilates your eyes, | improving focus. | | Oh, that on everyone patting themselves on the back for | building dark mode. | paulryanrogers wrote: | Maybe. I find so much white light overwhelming and have used | dark styles nearly everywhere for many years. Even with night | color shifting the lighter backgrounds feel like overkill ___________________________________________________________________ (page generated 2020-04-04 23:00 UTC)