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
0 answers

Android java - Dark mode implementation

I'm trying to implement dark mode for my app. every thing is fine so far, user have option to turn On/Off dark mode from app settings. But when the system is in dark mode and dark mode from app setting is turned off there is color mixing happening…
0
votes
2 answers

Detect if OS dark mode is active

I am looking a way to detect if OS dark mode is active, using Flutter. I just want my app to follow the OS dark mode setting. I've googling it and most of the topics are about "setting & switching" dark mode, not about detect the OS' dark mode.
Pitu Werno
  • 93
  • 5
0
votes
2 answers

Event LIstener before Dark Mode Function

Shure quite simple but it struggles me. I'm asked to put a Dark Mode Button in my Nav-Bar, which turns Dark Mode on and off. I found a solution for that, but now I have to implement it into the EventListener that looks like…
mtrg28
  • 3
  • 2
0
votes
0 answers

Manual toggle for darkMode - SASS - SCSS

I have an ionic project which uses the prefers-color-scheme: dark media query to listen to OS default theme settings & applies as preferred. I also have my images swapped between using the && tags. I now added a manual toggle…
nemer
  • 66
  • 3
0
votes
1 answer

How do I prevent the checkbox state from getting reset when the page is refreshed?

I created a button which activates dark mode on my website but I want to change it from a button to a checkbox like the one from the following CodePen example: https://codepen.io/mburnette/pen/LxNxNg The dark mode was stored in LocalStorage and it…
0
votes
0 answers

Remove text input underline border in React Native in dark mode

Underline border appears in React Native Textinput when in dark mode of the device, When switch to light mode it's gone TextInput when in light mode <---- screenshot TextInput when in dark mode <---- screenshot This is the react native style sheet…
0
votes
1 answer

How do I extend the current theme to my components in expo react-native?

I'm trying to implement themes (dark | light) in my expo react-native app. I've been reading their documentation on the dark and light themes on the expo page, and that works inside App.js. However, whenever I declare a component and import it in…
0
votes
0 answers

Separate dark/light mode files for an html site

I am working on a site, and I've made 2 different files with separate css for dark mode and light mode respectively. Each of these files have multiple subclasses with separate css within. For example there are 2 files, dark.css (dark mode) and…
0
votes
2 answers

how to make darkmode persistent in a webpage?

I have tried the persistence through local storage, but when try it it is showing an ugly user experience because JavaScript file is loaded each single time and the code is executed each single time, the feature is ugly with local storage, how can I…
0
votes
1 answer

How to create a switch to select a dark theme for Windows Form? That can darken the whole background? in c#

How can I create a switch to select a dark theme for Windows Forum (like a swipe switch in VPN)? That can darken the whole background? And I want to give options about what the user wants, for example, does he just want the background to be dark or…
0
votes
0 answers

Setup theme for dark mode in Android

I designed a theme settings fragment to let user choose between themes . It writes values to a Preferences Datastore which this then observed by the ViewModel's observer and theme is changed accordingly. However when I try to switch from System…
0
votes
1 answer

Svelte, Typescript, TailwindCSS dark mode support

I'm working on a Svelte3 project, trying to get TailwindCSS DarkMode support. From the docs I've read, it should be working locally? It's a pretty boilerplate Svelte project at the moment, with Tailwind, Typescript and PostCSS configured. Tailwind…
B-M
  • 1,231
  • 1
  • 19
  • 41
0
votes
1 answer

prefers-color-scheme activated whether dark mode is activated or not

I'm using the following CSS to invert an image under dark mode on my site: @media (prefers-color-scheme: dark) { #main-logo img {filter: invert(1);} } It works for dark mode but it's activated on light mode as well. I'm not sure how I can…
Tony Friz
  • 883
  • 1
  • 10
  • 27
0
votes
1 answer

How to add dark mode for anonymous users

I am using Django, I added dark mode to my website. But only for logged in users, is there a way to add it for anonymous users? Code: class Mood(models.Model): user = models.ForeginKey(User, null=True, blank=True, related_name=dark) And I…
mido mezo
  • 1
  • 1
0
votes
2 answers

How to implement theme appearance setting like YouTube in your android studio project

I am creating an app in android studio using java , I want to create a theme appearance setting like YouTube where user have 3 options to select one of them... 1) Use device theme 2) Dark theme 3) Light theme. But I don't know how to implement it in…
Asad
  • 1
  • 2