Project

General

Profile

Feature #145

Night Mode Rendering

Added by Soren Stoutner over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Next Release
Start date:
06/09/2017
Due date:
% Done:

0%

Estimated time:

Description

Add an option to render websites in night mode. Lightning browser is able to do this using WebView, even though it apparently it is using non publically supported APIs. https://issuetracker.google.com/issues/36984660

History

#1 Updated by Brian Toole over 1 year ago

I'm not quite sure how Lightning does this, but the source can be found here: https://github.com/anthonycr/Lightning-Browser

Another potential example would be one of the Facebook wrappers, as to my knowledge, they are just apps that render the web version of Facebook within Webview. A good example here would be MaterialFBook: https://github.com/ZeeRooo/MaterialFBook

Hermit Lite Apps also does this and gives the user options on color themes for night mode. This one is not open source, but it does have open source components - I'm not sure if the night mode rendering options are in the open or closed source parts, though: https://github.com/chimbori/lite-apps

#2 Updated by Brian Toole over 1 year ago

There's another app I've discovered that has a great Night Mode rendering called FAQr: https://play.google.com/store/apps/details?id=com.faqr&hl=en. It's currently not open source, but I have reached out to the developer and he's said he's considered making it so. In addition, he was very responsive, so if you have questions about his implementation, it might be worth contacting him.

It does download pages locally, so that might be why it is able to render the night mode so smoothly, but I'm not sure.

#3 Updated by Soren Stoutner over 1 year ago

Thanks for the information. I'll look into it.

#4 Updated by Soren Stoutner over 1 year ago

MaterialFBook is altering the CSS of the website to match the color scheme. They are able to do this because they are only loading one website (Facebook) and thus can hardcode the CSS tags that need to be modified. This approach would not work for browsing the internet at large.

#5 Updated by Soren Stoutner over 1 year ago

After playing with a number of settings, it is possible to tweak a small number of CSS settings that provide a nice Night Mode experience for almost all web pages. Doing so requires JavaScript to be enabled, because JavaScript is required to inject the CSS changes.

#7 Updated by Soren Stoutner 10 months ago

  • Priority changed from 3 to Next Release

Also available in: Atom PDF