<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>DarkMode &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/darkmode/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Thu, 23 May 2024 17:47:05 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>DarkMode &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[A security bug caused by… Dark Mode!]]></title>
		<link>https://shkspr.mobi/blog/2024/05/a-security-bug-caused-by-dark-mode/</link>
					<comments>https://shkspr.mobi/blog/2024/05/a-security-bug-caused-by-dark-mode/#respond</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 24 May 2024 11:34:32 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[CyberSecurity]]></category>
		<category><![CDATA[DarkMode]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=50648</guid>

					<description><![CDATA[Everyone loves Dark Mode. It is kinder on the eyes, less energy intensive, and looks hecking cool.  *5 seconds later* We regret to inform you that Dark Mode causes security bugs.  (With apologies to Ben Ward)  OK, OK. This isn&#039;t a particularly severe security bug, but I found it interesting.  The Matrix messaging app &#34;Element&#34; lets you sign in to your account on multiple devices. In order to…]]></description>
										<content:encoded><![CDATA[<p>Everyone loves Dark Mode. It is kinder on the eyes, less energy intensive, and looks hecking cool.</p>

<p>*5 seconds later* We regret to inform you that Dark Mode causes security bugs.</p>

<p>(With apologies to <a href="https://en.wikipedia.org/wiki/Milkshake_Duck">Ben Ward</a>)</p>

<p>OK, OK. This isn't a particularly <em>severe</em> security bug, but I found it interesting.</p>

<p>The Matrix messaging app "Element" lets you sign in to your account on multiple devices. In order to prove those devices are controlled by you, the app asks you to verify the other sessions. This is broadly sensible.</p>

<p>You sign in to the web-based messenger, then you sign in to the Android app. The web asks you if you just signed in, you say yes. The app then says "scan the code shown on the website". You do. And then both devices ask if the logo displayed is identical.</p>

<p>Simple! Ish.</p>

<p>Here's what the website shows:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2024/05/Element-Shield-Web-fs8.png" alt="Text reads &quot;Verify other device. Verify by scanning. Almost there! Is your other device showing the same shield?&quot; Image is of a Green Shield with a grey tick." width="980" height="480" class="aligncenter size-full wp-image-50650">

<p>So you take a look at your phone and see this:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2024/05/Element-Shield-App-fs8.png" alt="Image is of a Green Shield with a white tick." width="980" height="672" class="aligncenter size-full wp-image-50649">

<p>Are those two the <em>same</em> shield? They're both the same shape. They're both green. They both have a tick. But the tick is a different colour!</p>

<p>I <em>suspect</em> this is because the shield on the web has a transparent tick and expects the background colour to be white. But, when in Dark Mode, the background is grey.</p>

<p>Interestingly, my phone was also in Dark Mode - but the image has a solid white tick.</p>

<p>I'm not sure if it is specifically a bug in Matrix or Element (and, TBQH, I'm hazy about their relationshp) so I've <a href="https://github.com/element-hq/element-web/issues/27492">raised it on Element's GitHub</a>.</p>

<p>But, let this be a lesson to you. Test <em>all</em> of your interface with <em>all</em> of your different themes. And don't use transparency to convey important security information.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=50648&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2024/05/a-security-bug-caused-by-dark-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Should Android's Dark Mode Invert Contact Photos?]]></title>
		<link>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/</link>
					<comments>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 12 Oct 2023 11:34:39 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[AOSP]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[LineageOS]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=47423</guid>

					<description><![CDATA[I don&#039;t know if this is a bug, or just the way the world works now.  Several of the people who live in my phone use artistic black and white headshots. They look very cool. But my Android phone shows their image with inverted colours - so they look like pure shite.  Here&#039;s what my very real human girlfriend looks like when I ring her to go for brunch:   Come the evening, my phone switches to Dark …]]></description>
										<content:encoded><![CDATA[<p>I don't know if this is a bug, or just the way the world works now.</p>

<p>Several of the people who live in my phone use artistic black and white headshots. They look very cool. But my Android phone shows their image with inverted colours - so they look like pure shite.</p>

<p>Here's what my very real human girlfriend looks like when I ring her to go for brunch:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Normal-MM-fs8.png" alt="Screenshot of the Android contacts app. A black and white photo of Marylin Monroe is featured." width="540" height="674" class="aligncenter size-full wp-image-47428"></p>

<p>Come the evening, my phone switches to Dark Mode™ - so this is what she looks like when I ring her for a late-night booty call:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Inverted-MM-fs8.png" alt="Monochrome photo of Marylin Monroe. The colours have been inverted and it looks rubbish." width="540" height="674" class="aligncenter size-full wp-image-47427"></p>

<p>What's causing this? And is it expected behaviour?</p>

<p>I'm running <code>com.android.contacts</code> version 1.7.34 which <a href="https://android.googlesource.com/platform/packages/apps/Contacts/+/refs/heads/master/AndroidManifest.xml">appears to be the latest version</a> of the AOSP contacts app. It's bundled with LineageOS.</p>

<h2 id="demo"><a href="https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#demo">Demo</a></h2>

<p>If you're not lucky enough to be dating Marylin Monroe, here's a demo image for you to try:</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/monochrometest.jpg" alt="A white square with the words &quot;monochrome test&quot; printed in black text." width="274" height="274" class="aligncenter size-full wp-image-47425">

<h2 id="is-this-expected-behaviour"><a href="https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/#is-this-expected-behaviour">Is this expected behaviour?</a></h2>

<p>Based on some quick tests, it appears that the contacts app will invert some monochrome images when it thinks there's "too much" bright white in the image.</p>

<p>Interestingly, the contacts list doesn't invert avatars when in Dark Mode.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Contacts-list-view-fs8.png" alt="Screenshot of Android's contacts list. A black background - but the photo of Marylin is normal." width="606" height="336" class="aligncenter size-full wp-image-47429">

<p>And... I don't know if I want this to happen.  I guess that most people who use Dark Mode want to avoid blinding bright white light searing into their precious eyeballs. But, presumably, they don't want the photos of their friends inverted into a weird artefact-ridden mess?</p>

<p>So, before I get lost in Google's Kafka-esque bug reporting process - do <em>you</em> think this is expected or desirable behaviour?</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=47423&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/10/should-androids-dark-mode-invert-contact-photos/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>
