SwiftTheme - 🎨 Powerful theme/skin manager for iOS 8+ 主题/换肤, 暗色模式

  •        20

As part of our project requirement, we need to add night mode to our app. It's not as simple as just changing brightness or alpha on the top-level view—in fact, it needs an entirely new interface: different colors, different alpha, different image cuts. More accurately, "night mode" is a theme/skinning feature that can switch between bright theme and dark themes. So how do we achieve this? Maybe we can set a global variable that represents the currently selected theme, and use different background colors or image cuts based on the variable during the controller's initialization. But then how do we deal with views that have already been initialized? Yes, we could use notifications to change their colors or image cuts, but this leads to controllers unnecessarily full of notification register/unregister, if...else and UI updating code. Worse, if you forget to unregister the notifications, your app may crash.

https://github.com/wxxsw/SwiftTheme

Tags
Implementation
License
Platform

   




Related Projects

SwiftTheme - 🎨 Powerful theme/skin manager for iOS 8+ 主题/换肤, 夜间模式

  •    Swift

As part of our project requirement, we need to add night mode to our app 节操精选. It's not as simple as just changing brightness or alpha on the top-level view—in fact, it needs an entirely new interface: different colors, different alpha, different image cuts. More accurately, "night mode" is a theme/skinning feature that can switch between bright theme and dark themes. So how do we achieve this? Maybe we can set a global variable that represents the currently selected theme, and use different background colors or image cuts based on the variable during the controller's initialization. But then how do we deal with views that have already been initialized? Yes, we could use notifications to change their colors or image cuts, but this leads to controllers unnecessarily full of notification register/unregister, if...else and UI updating code. Worse, if you forget to unregister the notifications, your app may crash.

darkreader - Dark Reader Chrome and Firefox extension

  •    TypeScript

This extension inverts brightness of web pages and aims to reduce eyestrain while browsing the web. Visit Chrome Web Store and Firefox Add-ons for more info. Donate via Open Collective.

android-DarkTheme

  •    Java

Sample demonstrating the different ways to support Dark Mode on Android. Uses the Material Design Components Library. AppCompat has had "night mode" APIs for a number of years now. It allows developers to implement dark mode in their apps using the -night resource qualifier. The Material Design Components library builds upon AppCompat and exposes its own DayNight themes.

Gagat - A delightful way to transition between visual styles in your iOS applications.

  •    Swift

Gagat is a small Swift library that makes it easy to add a delightful, interactive way to switch between two different themes in your iOS application using a two-finger pan. The library was designed primarily for applications that support a "dark mode", and is heavily inspired by the Night Mode transition in Castro 2. Gagat is not a library for styling your iOS applications. You must write all the styling logic yourself without any help from Gagat, and then call your styling code from your implementation of GagatStyleable.toggleActiveStyle(). If you are unsure of how to implement the styling, the Example app included with Gagat showcases one way to support different themes in an application by using configuration models.

night-owl-vscode-theme - 🌌NIGHT OWL: A VS Code dark theme for contrast for nighttime coding

  •    Javascript

If you wish to disable italics, there is now a no-italic theme available. You will have access to both, select Night Owl No Italics as your color theme. The preview image is using Bracket Pair Colorizer, a really cool extension that highlights matching brackets. This can help reduce unwanted errors.


NightNight - Elegant way to integrate night mode to swift projects

  •    Swift

NightNight makes it easy to integrate night mode. It provides multiple APIs which all contain keyword mixed.

Solarized-Dark-for-Xcode - Solarized Dark Theme for Xcode

  •    Shell

I've moved away from using Solarized to a Night-Shift-friendly palette of my own creation; Cognac. It's available for many editors, including Xcode. I will still continue supporting this Solarized Dark theme for the Xcode community.

spacemacs-theme - Light and dark theme for spacemacs that supports GUI and terminal

  •    Emacs

Spacemacs theme is an Emacs color theme that started as a theme for spacemacs. The theme comes with dark and light variants and it should work well with 256 color terminals. The theme has good support for org mode.

LEETheme - 优雅的主题管理库- 一行代码完成多样式切换

  •    Objective-C

优点:直观 清晰, 编码时可随初始化控件编写完成, 不影响编码思路. 缺点:每个主题的设置固定, 不支持新主题的设置.

DKNightVersion - Manage Colors, Integrate Night/Multiple Themes

  •    Objective-C

DKNightVersion supports multiple methods for installing the library in a project. CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like DKNightVersion in your projects. See the Get Started section for more details.

Shifty - ☀️ A macOS menu bar app that gives you more control over Night Shift.

  •    Swift

Shifty is customizable! Make it easier to toggle Night Shift with Quick Toggle or set dark mode based on the schedule. For common Shifty actions, you can set global keyboard shortcuts. If you'd like to help translate Shifty into other languages, you can contribute here.

SPAlert - Native popup from Apple Music & Feedback in AppStore. Contains Done & Heart presets.

  •    Swift

Popup from Apple Music & Feedback in AppStore. Contains Done & Heart presets. Done preset present with animation. Also support Dark Mode. I clone Apple's alerts as much as possible. You can find this alerts in AppStore after feedback, after added song to library in Apple Music. See project's backers in Sponsors section.

dark-mode - Control the macOS dark mode from the command-line

  •    Swift

Requires macOS 10.10 or later.Download the binary and put it in /usr/local/bin.

atom-dark-ui - The default dark ui theme for Atom

  •    CSS

A dark UI theme for Atom.This theme is installed by default with Atom and can be activated by going to the Themes section in the Settings view (cmd-,) and selecting it from the UI Themes drop-down menu.

one-dark-ui - Atom One dark UI theme

  •    CSS

A dark UI theme that adapts to most syntax themes.The font used in the screenshot is Fira Mono.

seti-ui - A subtle dark colored UI theme for Atom.

  •    CSS

This is the latest version of the Seti UI theme. It's a dark interface theme crafted especially for Atom, with subtle colors that are meant to be easy on the eyes. It includes custom file icons, and new user configurable settings. Seti Syntax is also available for all your codez. This is for the interface of the Atom editor. I also have Seti Syntax for theming the code view in Atom. In addition, there is a new Seti theme for Hyper.

FolioReaderKit - 📚 A Swift ePub reader and parser framework for iOS.

  •    Swift

FolioReaderKit is an ePub reader and parser framework for iOS written in Swift. FolioReaderKit is available through CocoaPods and Carthage.

ayu - 🎨🖌 Modern Sublime Text theme

  •    Javascript

ayu is a simple theme with bright colors and comes in three versions — dark, mirage and light for all day long comfortable work. ayu uses Roboto Mono as main font and it's highly recommended to install it to get monospaced font in filetree. But if you don't have it then the UI theme will downgrade to standard UI font used in Sublime Text.

one-dark-syntax - Atom One dark syntax theme

  •    CSS

The font used in the screenshot is Fira Mono.There is also a matching UI theme.

nuklear - A single-header ANSI C gui library

  •    C

This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output. So instead of providing a layered library that tries to abstract over a number of platform and render backends it only focuses on the actual UI. This library is self contained in one single header file and can be used either in header only mode or in implementation mode. The header only mode is used by default when included and allows including this header in other headers and does not contain the actual implementation.