this post was submitted on 18 Jul 2024
612 points (98.1% liked)

Technology

59525 readers
4019 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] dual_sport_dork@lemmy.world 79 points 4 months ago (3 children)

So, if I'm reading this right it's basically just a 17 paragraph essay that boils down to, "Sorry we suck at CSS and it took us a decade to finally get around to rooting out all the random shit from 2014 that was hard-coded to display as rgb(0,0,0) or whatever, which was a capability that in retrospect we really shouldn't have handed out like candy?"

The TV Tropes wiki has managed to have a built in dark mode for at least the last 7 years. TV Tropes. Come on, guys.

I'm baffled by the section about "making a shortcut that darkens all the colors on the page." I'm positive that's the intent of that entire blurb, to dazzle people with bullshit in the hopes that they won't ask Hard Questions, because no competent designer would ever try such a thing. It is a self-evidently moronic idea. You don't fuck with elements you didn't create and don't control, like images and color swatches.

There are only really two viable possibilities, here:

  1. If arbitrary user definable, hard-coded colors in content are permissible, you'll have to accept the fact that the cards will fall where they may and some instances will inherently be suboptimal in either light or dark modes, or...
  2. Accept that you won't allow users to hard-code colors into anything outside of specific elements where that usage is valid, so users will just have to suck it up and pick from a list of preapproved color combinations with light and dark mode renditions.
[–] tal@lemmy.today 22 points 4 months ago (1 children)

The TV Tropes wiki has managed to have a built in dark mode for at least the last 7 years. TV Tropes. Come on, guys.

It'd be kind of interesting to have a "dark mode spider" that crawls the Web and checks to see what percentage of websites support the browser-requested dark mode. I'd be kind of curious to see how far along we are.

I mean, people have done it for stuff like IPv6 support for a while.

[–] kippinitreal@lemmy.world 4 points 4 months ago (1 children)

Didn't Google's lighthouse have a metric for that? "Colour Contrast ratio" or something?

[–] tal@lemmy.today 2 points 4 months ago

Not familiar with it.

goes looking

Oh, it's a tool that you run on one page, rather than a spider to try to gather statistics on the Web as a whole. But, yeah, that run en masse could maybe gather that kind of information.

[–] ozymandias117@lemmy.world 17 points 4 months ago* (last edited 4 months ago) (1 children)

Isn't #2 the only option?

Websites specifying color for foreground (or background) and assuming browsers will use whatever color they're expecting for the other has always existed, and still exists

If you're getting fancy and specifying colors, you can't cheap out and not specify all colors

If the browser ignores all your colors at that point, then it's displaying as the user intended

If you only specified some of the colors, it's a bug of the website

[–] jpeps@lemmy.world 5 points 4 months ago

There are actually things websites can do which may be more common than you'd think. At a high level you could convert all the custom colours to HSV format and slightly lower the value and saturation according to some function. This is fairly common for images.

[–] Etterra@lemmy.world 1 points 4 months ago

Like how amazing an innovation in NYC the technology which is... Plastic trash cans! With lids!