Scrivener for iOS - Dark Mode

Ch
ChrisDuda
Posts: 8
Joined: Fri Mar 28, 2014 3:06 pm
Platform: Mac

Wed Jul 20, 2016 1:59 pm Post

I purchased Scrivener for iOS this morning. Thank you! Thank you! Thank you!

The first wish I have this product is a dark mode. I have found the settings to change the background color of the text window, however cream and grey are still too "bright". For my middle aged eyes, I find a dark background with white text to be easier to handle over long periods. Ideally I would love for the entire interface to be dark, but perhaps a dark full screen text window would work as well.

I understand that this is not critical need, but I am expecting to use Scrivener for iOS a lot on my 12.9" iPad Pro, so adding this feature would be great! The ability to skin Ulysses to a dark interface is a great feature, but I like Scrivener so much more.

Thank you again for all of the hard work and effort in building Scrivener for iOS!

--Chris
- Chris

User avatar
gr
Posts: 2263
Joined: Wed Feb 14, 2007 3:57 am
Platform: Mac + iOS
Location: Florida

Wed Jul 20, 2016 2:06 pm Post

iOS has a built-in "dark mode" that can be made accessible through triple-click of the Home button. What it actually does is invert colors, but this achieves exactly what you are looking for inside the iOScriv interface.

See Settings app > General > Accessibility > Accessibility Shortcuts : enable Invert Colors.

Ch
ChrisDuda
Posts: 8
Joined: Fri Mar 28, 2014 3:06 pm
Platform: Mac

Wed Jul 20, 2016 5:19 pm Post

gr wrote:iOS has a built-in "dark mode" that can be made accessible through triple-click of the Home button. What it actually does is invert colors, but this achieves exactly what you are looking for inside the iOScriv interface.

See Settings app > General > Accessibility > Accessibility Shortcuts : enable Invert Colors.


Thanks for the response. I am very aware of that iOS feature...and I do have it turned on. It works well enough, but having a dedicated dark mode is still on my wish list.
- Chris

User avatar
KB
Site Admin
Posts: 20920
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Wed Jul 20, 2016 5:35 pm Post

Dark mode is much more difficult in rich text apps such as Scrivener than it is in plain text apps such as Ulysses. In plain text apps, the text itself has no style, so changing the colour does not affect any data - it's purely a display thing. In rich text apps, the text colour is part of the data itself (because in a rich text app, you can change the colour of the text). In the Mac text system, there is a "temporary formatting" feature that allows developers to apply a temporary colour to text, which we use in the full screen mode. This feature is not available in iOS.

I do know of a way to override the text colour, but unfortunately there's no way to also override the colour of underlines and strikethroughs. So, this is the fundamental problem of adding a dark mode to Scrivener for iOS.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Ch
ChrisDuda
Posts: 8
Joined: Fri Mar 28, 2014 3:06 pm
Platform: Mac

Fri Jul 22, 2016 3:48 am Post

KB wrote:Dark mode is much more difficult in rich text apps such as Scrivener than it is in plain text apps such as Ulysses. In plain text apps, the text itself has no style, so changing the colour does not affect any data - it's purely a display thing. In rich text apps, the text colour is part of the data itself (because in a rich text app, you can change the colour of the text). In the Mac text system, there is a "temporary formatting" feature that allows developers to apply a temporary colour to text, which we use in the full screen mode. This feature is not available in iOS.

I do know of a way to override the text colour, but unfortunately there's no way to also override the colour of underlines and strikethroughs. So, this is the fundamental problem of adding a dark mode to Scrivener for iOS.

All the best,
Keith


Thank you for the explanation! I have built several iOS apps so I am familiar with the challenges you mentioned. When I have had to invert colors for dark operations (or provide user selectable color themes), extending UIcolor with an invert/dark/slection method that calculates the appropriate dark/inverse/user color attribute has worked even with styled text (underlines, strikethroughs, etc). However, I do not know how you have implemented your text editor views so type extensions may not work like they have for me.

Thank you again for answering and releasing Scrivener for iOS! I am loving it!
- Chris

User avatar
KB
Site Admin
Posts: 20920
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Fri Jul 22, 2016 10:00 am Post

Hi,

It's not that it's a problem with styled text (NSAttributedString) in general, but rather a problem with rich text data. In Scrivener's editor, like in Word and Pages, the data you are working with is rich text. So, you can make this word red, this sentence green if you want. And the problem is that if I, as a programmer, change the colour of the text for a dark mode, that colour becomes part of the data. So, that word you made red and the sentence you made green loses the colour, and all of the text becomes a different colour.

On macOS, you can tell NSLayoutManager to draw the text in different colours - to ignore the colours associated with underlying data and use something different. That facility is not available in the iOS frameworks. However, I think I do have a way of doing it by completely overriding the drawing in NSLayoutManager.

There are other issues with a dark mode in Scrivener, too - there are all those bright coloured labels you can add, and all the coloured icons, none of which will look good on a dark background. What I *could* do, though, if I can solve the technical program mentioned above, is at least add a dark *writing* mode.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Ch
ChrisDuda
Posts: 8
Joined: Fri Mar 28, 2014 3:06 pm
Platform: Mac

Fri Jul 22, 2016 1:59 pm Post

KB wrote:What I *could* do, though, if I can solve the technical program mentioned above, is at least add a dark *writing* mode.


Thank you again for the great explanation! A dark writing mode would be a welcome enhancement!
- Chris

Si
Sirshanksalot
Posts: 5
Joined: Fri Aug 12, 2016 11:25 pm
Platform: Mac + iOS

Sat Aug 13, 2016 12:29 am Post

Godspeed.

Or should that be – Dark lord speed ;-)

User avatar
yosimiti
Posts: 602
Joined: Sun Nov 09, 2014 5:56 am
Platform: Mac

Sat Aug 13, 2016 3:20 pm Post

+1 Keith, that's awesome if you could do it. An idea- why not just make the whole iOS scriv interface dark?
This would eliminate the contrast issue you spoke of

sh
shaggyred
Posts: 2
Joined: Sun Aug 14, 2016 1:28 pm
Platform: Mac + iOS

Sun Aug 14, 2016 1:52 pm Post

Hi, I just registered to add my request on this, too. My preferred editor is a dark grey background with a light-colored text (light-green or blue normally) and not the sharp white on black you get with iOS inverted color setting. I find that the light-color on dark-grey type of color scheme is much, much more comfortable and less straining on the eyes, especially when I'm writing at night.

As to the difficulties w/ regards to styling in dark-mode personally I would be fine with the iOS dark mode using only un-styled text while in dark-mode or using the same mechanism that you use for desktop "composition" mode where the text will only have one color setting. As it currently stands now, my styling choices from the desktop app don't seem to transfer to the iOS version so I have to restyle anyway, and if I have to restyle anyway, then I'd just as soon have a comfortable writing environment that makes it more worthwhile.

I realize that this may not be a popular opinion but I don't look to Scrivener as a tool for text styling and formatting. I rely on it to provide me the organizational structure I need to make my writing better. If adding a proper dark mode means that my text styling gets mucked up a bit then that's a sacrifice I'm more then willing to make if it means I can write that text in a more comfortable way.

User avatar
yosimiti
Posts: 602
Joined: Sun Nov 09, 2014 5:56 am
Platform: Mac

Sun Aug 14, 2016 2:10 pm Post

I have eye strain issues and a black background would really improve my workflow; but yes, I agree that this matter is secondary to the app's fundamental ability to organize your writing and nothing should impede that particular agenda.

User avatar
gr
Posts: 2263
Joined: Wed Feb 14, 2007 3:57 am
Platform: Mac + iOS
Location: Florida

Sun Aug 14, 2016 8:07 pm Post

shaggyred wrote:As to the difficulties w/ regards to styling in dark-mode personally I would be fine with the iOS dark mode using only un-styled text while in dark-mode


I think part of Keith's point is that you couldn't just un-style the text while in a dark mode.

gr
Last edited by gr on Mon Aug 15, 2016 4:14 am, edited 6 times in total.

User avatar
yosimiti
Posts: 602
Joined: Sun Nov 09, 2014 5:56 am
Platform: Mac

Sun Aug 14, 2016 9:40 pm Post

This is starting to make my eyes hurt reading this convo off my little iPod. I wish this forum had a night mode that didn't involve me having to invert all the colours of my little display through the accessibility feature!

But it's my brain that hurting from the technicality of this discussion...

Can't tell which is which ....*

*he says while turning off his light switch to muse about deep and esoteric things in the dark...

User avatar
igstudio
Posts: 35
Joined: Fri Jan 30, 2015 7:34 pm
Platform: Mac + iOS

Thu Sep 08, 2016 5:19 pm Post

KB wrote:There are other issues with a dark mode in Scrivener, too - there are all those bright coloured labels you can add, and all the coloured icons, none of which will look good on a dark background. What I *could* do, though, if I can solve the technical program mentioned above, is at least add a dark *writing* mode.

Would it be possible to temporarily override the font face as well? Or would it be too massive of the undertaking? What I have dreamed up is ultimately an alternate editor, where user could select text/background colour (or at least shade of grey) pick a keyboard (light/dark) and an alternate font (I would love to be able to write in monospace font, and then proofread/edit in full rtf environment)?

de
derick
Posts: 442
Joined: Mon Aug 11, 2008 9:58 pm

Thu Sep 08, 2016 6:42 pm Post

This would be so much more easily resolved by copying and pasting into a program with a built-in dark mode....