Questions tagged [darkmode]

General questions related to support of Dark Mode mode themes for OS, framework, and application programming.

Relating to programming for Dark Mode themes. Support of swapping from standard or default modes into Dark Mode.

As more OSes, frameworks, and programs support Light and Dark mode theme selection, programming to handle all theme cases gets complicated, especially on cross-platform apps.

566 questions
0
votes
1 answer

When I click the button to change all the another buttons to dark mode, it works just a single time

I made a button to change all the page to dark mode. I have some dark buttons I want to change it to light when I click the button that change the page to dark mode. The problem is when I want to change the page to dark mode it works, but with the…
MunJitso
  • 23
  • 2
  • 10
0
votes
2 answers

How can i get the right ColorScheme in react-native?

I use a custom hook to support dark mode with tailwindcss in my new react-native app, created with Expo CLI. The TailwindProvider with the dark mode logic looks like this: const TailwindProvider: React.FC = ({ children }) => { const…
Niklas
  • 1,638
  • 4
  • 19
  • 48
0
votes
1 answer

Can't Fix React Dark Mode Flashing

I am facing a frustrating issue with implementing dark mode into my React application. The application reads from localStorage and applies the theme preferred by the user (this is all done by use-dark-mode). Unfortunately, everytime the user opens…
wgumenyuk
  • 420
  • 5
  • 16
0
votes
0 answers

Writing text and DarkMode don’t work together

I need your help! I want to automatic writing text and turn ON/OFF DarkMode. I copied writing text from other developer. But I create DarkMode alone. Writing text was working. DarkMode too. But when I use both on one page, one of these doesn’t work.…
MartanKing
  • 31
  • 6
0
votes
0 answers

Vue - How to change svg color based on Dark Mode or Light Mode

In my vue project I have two themes which are Dark and Light mode. I created root variables and dark mode variables for color codes so I can switch between them. Everything so far is okay but I have a question. I am not able to change the .svg color…
Yasin Demirkaya
  • 243
  • 6
  • 22
0
votes
0 answers

How tto switch eclipse to dark theme

I've looked through several websites and stack overflow questions and none of them solved my problem. I am running eclipse on windows 10 and when I switched to dark theme, the console and editor changed, but all the labels are still the same. How do…
0
votes
1 answer

How to set Mac application user interface light/dark theme back to default in Objective C?

In my Qt application I want to give the user the option to set the light/dark theme of their app to: The same as the operating system theme Light (ignoring the operating system theme) Dark (ignoring the operating system theme) For 1. I can just…
Andy Brice
  • 2,297
  • 1
  • 21
  • 28
0
votes
1 answer

Ionic how to know programmatically if the dark theme is applied?

I'm working with Ionic angular and Mapbox. I want to know which theme is applied to load the mapbox theme too... something like this: const currentIonicTheme = ionic.theme.apllied; // here is where I want to know how to get the current theme in the…
Sergio Mendez
  • 1,311
  • 8
  • 33
  • 56
0
votes
1 answer

Toggle icon not showing unless I click it

I am using a dark mode code. With this code, I want to toggle between dark mode and light mode using respective icons. This works perfectly, but the only issue is dark/light icon is not shown by default when page loads. If I click the icon, then…
KA.MVP
  • 29
  • 10
0
votes
1 answer

Is there a way to point a SASS variable at a CSS variable?

I'm trying to implement dark mode and want to use CSS variables so that I can change colors easily depending on whether light/dark mode is enabled. I'm using the prefers-color-scheme media query in order to display the css variable color…
Dedot
  • 1
  • 3
0
votes
1 answer

some Question About dark mode from android

When I use AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); to open & close dark mode. then i test using my phone's dark mode Button(not my app code),…
0
votes
1 answer

Can I implement a dark-mode option if I only have access to the stylesheet?

A sub domain of my site uses a cname record to point to a 3rd party resource. Support is limited. The only control I have over that resource is the style. On page load, it pulls in a stylesheet from the root of the main domain. Within that…
Baddie
  • 305
  • 1
  • 3
  • 11
0
votes
1 answer

SCSS variables do not work in conjunction with prefers-color-scheme: dark

I'm currently experimenting a bit with the CSS feature prefers-color-scheme.Since I'm using SCSS, I declare all the colors I use at the beginning. So here's what I did: $textColor: #1B1C1E; $hoverColor: #0203048a; @media (prefers-color-scheme:…
JueK3y
  • 267
  • 9
  • 22
0
votes
0 answers

Failed to execute 'getComputedStyle' on 'Window'

I have a problem in my code that is responsible for exchanging themes like light and dark. put in a particular piece of code. gives an error and the message is this Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is…
0
votes
1 answer

JS change browser tab icon when darkmode is enabled

I have this script, that works for what its supposed to: const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); darkModeMediaQuery.addListener((e) => { const darkModeOn = e.matches; console.log(`Dark mode is…
andreasv
  • 450
  • 1
  • 4
  • 15