<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="/style/atom.css" ?>

<feed xmlns="http://www.w3.org/2005/Atom">

<title>Michel Fortin</title>
<link href="https://michelf.ca/"/>
<link href="https://michelf.ca/blog/atom/" rel="self"/>
<updated>2025-11-21T23:15:25-05:00</updated>
<author>
	<name>Michel Fortin</name>
	<email>&#109;&#105;&#99;&#x68;&#101;&#x6c;&#x2e;&#x66;&#x6f;&#x72;t&#105;&#110;&#64;&#109;&#105;c&#104;&#x65;&#108;&#102;.&#99;a</email>
</author>
<id>tag:michelf.ca,2012:/blog/</id>

<entry>
	<title>Introducing Black Light 3</title>
	<link href="https://michelf.ca/blog/2023/introducing-black-light-3"/>
		<id>tag:michelf.ca,2023:/blog/2023/introducing-black-light-3/</id>
		<updated>2023-12-15T08:30:00-05:00</updated>
	<content type="html">
&lt;p class=&quot;picture side-note&quot;&gt;
&lt;img src=&quot;/img/2023/black-light-v3.png&quot; width=&quot;64&quot; height=&quot;64&quot; /&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/projects/black-light/&quot;&gt;Black Light&lt;/a&gt; is a macOS app to apply color effects on a screen. From its original task of inverting the screen, the app slowly expanded and added more settings over the years. And with Black Light 3, possibilities in term of effects and how to trigger them have expanded a lot.&lt;/p&gt;

&lt;div class=&quot;&quot;&gt;
    &lt;img class=&quot;tagimage&quot; src=&quot;/img/2023/en.black-light-3-effects.jpg&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;New settings in Black Light 3 include Clipping, which encompass underexposure and overexposure, and Gamma Shift, which gently pushes grays towards white or black.&lt;/p&gt;

&lt;p&gt;But more important is that the app will store many effects and you can easily switch between them. Or Black Light can switch automatically based on time or which app is frontmost.&lt;/p&gt;

&lt;p&gt;Effects can also hold separate active and inactive configurations. How the inactive one works depends on what you choose in the app&amp;#8217;s settings. Black Light can track inputs and after a certain time switch to the inactive configuration, but it can also track the location of the mouse pointer and make screens inactive whenever you move your mouse to another screen.&lt;/p&gt;

&lt;p&gt;If you have more than one screen, the choosen effect will apply to all of them. But each effect can hold a different configuration per secreen if you choose so.&lt;/p&gt;

&lt;p&gt;Many things in this new version of Black Light are comming from Black Light Pro, but have been repackaged in an way that is easier to use. This also marks the discontinuation of Black Light Pro, which for the most part has been merged into Black Light.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/projects/black-light/&quot;&gt;Black Light 3&lt;/a&gt; is available for $18.99&amp;#160;&lt;small&gt;USD&lt;/small&gt; directly on this website and via the Mac App Store. A &lt;a href=&quot;/projects/black-light/trial/&quot;&gt;free 30-day trial&lt;/a&gt; is also available.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>Brighter than White — EDR on Macs</title>
	<link href="https://michelf.ca/blog/2020/brighter-than-white-edr-on-macs"/>
		<id>tag:michelf.ca,2020:/blog/2020/brighter-than-white-edr-on-macs/</id>
		<updated>2020-12-05T17:05:00-05:00</updated>
	<content type="html">
&lt;p&gt;&lt;a href=&quot;https://prolost.com/blog/edr&quot;&gt;Stu Maschwitz observes&lt;/a&gt; that Apple has enabled the display HDR content on many older Macs models. Until now I thought this was a feature only for the very pricy Apple XDR Display hardware, but it looks like support also exists for the far more &amp;#8220;ordinary&amp;#8221; screens of some older Macs.&lt;/p&gt;

&lt;p&gt;I downloaded the two HDR clips he shared and did a little experiment. And I think there’s one detail wrong in this paragraph from Stu’s blog:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Think of it this way: This EDR display philosophy is so important to Apple that they are willing to spend battery life on it. When you map “white” down to gray, you have to drive the LED backlight brighter for the same perceived screen brightness, using more power. Apple has your laptop doing this all the time, on the off chance that some HDR pixels come along to occupy that headroom.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I&amp;#8217;m pretty sure it&amp;#8217;s wrong to say they&amp;#8217;re making the LED backlight brighter all the time. My observations support that the display brightness and color mappings change dynamically when some HDR content appears on screen. Those are reverted back to normal once the HDR image disappears. So no compromise on battery life until you put HDR content on your screen: the display is only made brighter while HDR content is visible.&lt;/p&gt;

&lt;p&gt;Here’s how I came to that conclusion.&lt;/p&gt;

&lt;p&gt;First of all, I have a late 2014 Retina 5K iMac, which appears to support EDR. (Wow!)&lt;/p&gt;

&lt;p&gt;When I select one of Stu&amp;#8217;s HDR video with the Finder in column view, it shows a preview in the rightmost column. When the preview first appears on screen, it is rendered normally, in SDR. It then progressively becomes brighter over the span of one or two seconds. Brighter than the surrouding white. This appears to be the EDR system firing up: slowly cranking up the display brightness at the same time as it darkens the standard white point for everything but the video. Those two operations are done in tandem so well that you don’t perceive any change on screen other than the video becoming brighter.&lt;/p&gt;

&lt;p&gt;There are however some small side effects you can observe. I&amp;#8217;ll take my free app &lt;a href=&quot;/projects/mac/sim-daltonism/&quot;&gt;Sim Daltonism&lt;/a&gt; to do some observations. Set it so it does not filter anything (the &amp;#8220;normal vision&amp;#8221; setting), and all it’ll do then is continuously take a screenshot and render it its window. As EDR is firing up you can observe those screenshots of the video in the window slowly becoming overexposed. That&amp;#8217;s because Sim Daltonism screenshots comes from an EDR image that gets truncated to SDR. Here&amp;#8217;s what it looks like:&lt;/p&gt;

&lt;div class=&quot;panorama&quot;&gt;
    &lt;video width=&quot;584&quot; height=&quot;335&quot; controls&gt;
        &lt;source src=&quot;/img/2020/edr-experiment.mp4&quot; type=&quot;video/mp4&quot; /&gt;
        &lt;source src=&quot;/img/2020/edr-experiment.ogg&quot; type=&quot;video/ogg&quot; /&gt;
      [Your browser does not support displaying this &lt;a href=&quot;/img/2020/edr-experiment.mov&quot;&gt;video&lt;/a&gt;]
    &lt;/video&gt;
&lt;/div&gt;

&lt;p&gt;Another thing you might notice while EDR is activating (or when it&amp;#8217;s shutting down) is occasionally some of the frames in Sim Daltonism can be black, sometimes only for some windows in the screenshot. It’s as if the window server fails to produce a screenshot during the process of activating or shutting down EDR.&lt;/p&gt;

&lt;p&gt;Note that for EDR to work (on this hardware) you can’t have your screen at full brightness. And thus when at full brightness, Sim Daltonism will not show you overexposed screenshots and you won’t see any black glitches. EDR cannot do anything at full brightness on this monitor, so there are no side effects so see.&lt;/p&gt;

&lt;p&gt;On macOS Big Sur, when in dark mode, I noticed some white text labels are sensitive to EDR. (This looks like a bug.) When the video becomes visible on screen and EDR activates, those white text labels will slowly brighten at the same time as the video. I’ve located two of those labels for now: Safari’s active tab text (while the window is frontmost), and Gamma Control’s text label below the tabs (when the palette is set to translucent dark appearance). There&amp;#8217;s also the checkmark for checked items in menus that appears affected. When you close the window with the video, they’ll slowly fade back to normal white. It can be a bit hard to see though.&lt;/p&gt;

&lt;p&gt;Another Big Sur issue: running an app that tweaks the gamma curve can break this EDR system temporarily. If you open and then quit &lt;a href=&quot;/projects/gamma-control/&quot;&gt;Gamma Control&lt;/a&gt;, or do the same with Apple&amp;#8217;s Calibration Assistant, the  image of the HDR suddenly lose its EDR-enhanced brightness. It&amp;#8217;ll regains its brightness the next time you open an app (any app). At least it does that on my iMac. If you&amp;#8217;re at Apple, see FB8929660.&lt;/p&gt;

&lt;p&gt;This has been tested on macOS Big Sur 11.0.1 and Catalina 10.15.7.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>macOS Big Sur and M1 Macs</title>
	<link href="https://michelf.ca/blog/2020/big-sur-m1-macs"/>
		<id>tag:michelf.ca,2020:/blog/2020/big-sur-m1-macs/</id>
		<updated>2020-11-11T21:15:00-05:00</updated>
	<content type="html">
&lt;p&gt;As the new version of macOS is around the corner and the first Macs with a new processor type will be shipped soon, I want to state that my apps are already fully compatible with both. Here&amp;#8217;s the current state of things and what&amp;#8217;s to expect in the near future.&lt;/p&gt;

&lt;div&gt;
&lt;img src=&quot;/img/2020/big-sur-window.jpg&quot; width=&quot;558&quot; height=&quot;84&quot; style=&quot;display: block; margin: auto; border-bottom: 2px solid #ddd&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;macOS Big Sur makes many changes, visual ones especially, but those changes aren&amp;#8217;t causing any problems to my apps.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/projects/gamma-control/&quot;&gt;Gamma Control&lt;/a&gt;, &lt;a href=&quot;/projects/black-light/&quot;&gt;Black Light&lt;/a&gt;, &lt;a href=&quot;/software/black-light-pro/&quot;&gt;Black Light Pro&lt;/a&gt;, &lt;a href=&quot;/software/counterparts-lite/&quot;&gt;Counterparts Lite&lt;/a&gt;, &lt;a href=&quot;/projects/mac/sim-daltonism/&quot;&gt;Sim Daltonism&lt;/a&gt; and &lt;a href=&quot;/software/mac/red-stripe/&quot;&gt;Red Stripe&lt;/a&gt; are all ready for Big Sur as they are now.&lt;/p&gt;

&lt;div style=&quot;background: black&quot;&gt;
&lt;img src=&quot;/img/2020/m1.jpg&quot; width=&quot;96&quot; height=&quot;96&quot; style=&quot;display: block; margin: auto&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;The M1 chip in the new Macs uses a different instruction set than Intel processors in the previous models. But macOS can run most apps built for Intel by translating them using Rosetta. As a user, this happens without you noticing anything. I already tested all my apps and can confirm they all run fine using Rosetta.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s one thing I couldn&amp;#8217;t verify myself in advance though: whether the new hardware supports setting the gamma correction curve. This is needed for Gamma Control, Black Light, and Black Light Pro to do what they do. I&amp;#8217;ve been specifically told it should work. And given that some parts of macOS also depend on this I&amp;#8217;m not expecting any problems.&lt;/p&gt;

&lt;p&gt;I plan to update all my Mac apps in the coming weeks. They&amp;#8217;ll get a nice new icon for Big Sur and some will gain interesting new features. They&amp;#8217;ll also become universal so they can work natively on M1 without using Rosetta.&lt;/p&gt;

&lt;div&gt;
&lt;img src=&quot;/img/2020/new-app-icons.jpg&quot; width=&quot;499&quot; height=&quot;62&quot; style=&quot;display: block; margin: auto; padding: 0 10px; border-top: 2px solid #ddd&quot; /&gt;
&lt;/div&gt;

	</content>
</entry>
<entry>
	<title>Sim Daltonism’s purple bug</title>
	<link href="https://michelf.ca/blog/2020/sim-daltonism-purple"/>
		<id>tag:michelf.ca,2020:/blog/2020/sim-daltonism-purple/</id>
		<updated>2020-06-19T23:30:00-04:00</updated>
	<content type="html">
&lt;p&gt;Back in 2016, I converted the filter algorithm in Sim Daltonism 1.x to OpenGL shader code so it&amp;#8217;d run on the GPU and have better performance. This also made it possible to bring it to iOS as a real-time filter for the camera. A bug slipped through however.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/2020/deuteranopia-color-wheel-fix.jpg&quot; width=&quot;523&quot; height=&quot;309&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On a filtered color wheel we can observe that a region of deeply saturated blue becomes purple. This makes no visual sense: purple light is blue light + red light, and this purple area showed up even for protanopia (no red cones). This also wasn&amp;#8217;t happening with version 1, and it wasn&amp;#8217;t happening on the &lt;a href=&quot;http://colorlab.wickline.org/colorblind/colorlab/&quot;&gt;Color Laboratory&lt;/a&gt; on which Sim Daltonism&amp;#8217;s filter algorithm is based.&lt;/p&gt;

&lt;p&gt;I dug up the code for version 1 and tried to find differences. I did not have much success at finding accidental algorithmic differences. So I finally tried to clamp some values within the 0&amp;#8230;1 range they were supposed to be in; theoretically the result of the calculation shouldn&amp;#8217;t be out of this range but that doesn&amp;#8217;t account for rounding errors in floating point calculations. GPUs are quite fast, but they sometimes sacrifice precision to achieve that speed. And &lt;a href=&quot;https://github.com/michelf/sim-daltonism/commit/d6b62e9304d70c81a27701c299db452a5ea170fe&quot;&gt;that&lt;/a&gt; did the trick.&lt;/p&gt;

&lt;p&gt;So now there&amp;#8217;s a new version of &lt;a href=&quot;/projects/sim-daltonism/&quot;&gt;Sim Daltonism&lt;/a&gt; with a corrected filter on both Mac and iOS. And I want to thank &lt;a href=&quot;https://twitter.com/lisacrost&quot;&gt;Lisa Charlotte Rost&lt;/a&gt; for signaling this bug after comparing with other color blindness simulation tools.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>More Hot Keys in Black Light Pro</title>
	<link href="https://michelf.ca/blog/2020/more-hot-keys-black-light-pro"/>
		<id>tag:michelf.ca,2020:/blog/2020/more-hot-keys-black-light-pro/</id>
		<updated>2020-02-13T14:30:00-05:00</updated>
	<content type="html">
&lt;p&gt;Some people find their display too bright, and some displays are actually too bright. You can dim the backlight of your display, but what if the lowest setting is still too bright? Then you can use &lt;a href=&quot;/projects/black-light/&quot;&gt;Black Light&lt;/a&gt; or &lt;a href=&quot;/software/black-light-pro/&quot;&gt;Black Light Pro&lt;/a&gt; to dim the display more&amp;#8230; problem solved? Not entirely it seems.&lt;/p&gt;

&lt;p&gt;I occasionally get requests for ways to dim the display using global keyboard shortcuts, often known as &amp;#8220;hot keys&amp;#8221;. In Black Light Pro you can have many effects configured with various dim levels, and you can assign a hot key to each. But wouldn&amp;#8217;t it be better to have two keys for increasing or decreasing the brightness? The new version of Black Light Pro is making this possible, and more.&lt;/p&gt;

&lt;p&gt;With version 1.2 of Black Light Pro you can now set hot keys to increase and decrease brightness, change the tinting vividness and hue, toggle the invert effect, etc. Those changes will be saved to the current active effect.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/shots/black-light-pro/hotkeys.en.png&quot; width=&quot;310&quot; height=&quot;434&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you have more than one monitor, you can apply the same effect on all of them or apply a different effect to each. In the former case hot keys will control the effect for all the screens at the same time. In the later case hot keys will let you to control each screen independently, with one hot key to cycle between them.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/software/black-light-pro/&quot;&gt;Black Light Pro&lt;/a&gt; comes with a &lt;a href=&quot;/software/black-light-pro/trial/&quot;&gt;30-day trial&lt;/a&gt; so you can experience it yourself.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>Font substitution and missing text</title>
	<link href="https://michelf.ca/blog/2019/font-substitution-missing-text"/>
		<id>tag:michelf.ca,2019:/blog/2019/font-substitution-invisible-text/</id>
		<updated>2019-10-18T22:32:00-04:00</updated>
	<content type="html">
&lt;p&gt;I recently found a bug in my work-in-progress-next-major-version of Counterparts Lite where text in certain languages was not showing up in the text editor. The problem ended up being related to font substitution. If characters from certain languages aren&amp;#8217;t showing up in your Cocoa text views, here&amp;#8217;s something to check&amp;#8230;&lt;/p&gt;

&lt;p&gt;The first thing to understand is that no font contains all the characters defined in Unicode. When the text system encounters characters that aren&amp;#8217;t representable in the current font, it chooses another font that has the correct glyphs to display those characters.&lt;/p&gt;

&lt;p&gt;Every time you change some part of a &lt;code&gt;NSTextStorage&lt;/code&gt; object in Cocoa, its &lt;code&gt;processEditing&lt;/code&gt; method is called to optimize attribute ranges and fix things that could be incoherent (such as a paragraph style spanning only part of a paragraph). This is also where font substitution happens.&lt;/p&gt;

&lt;p&gt;You can observe what &lt;code&gt;processEditing&lt;/code&gt; is doing easily by setting a delegate on the text storage implementing the &lt;code&gt;willProcessEditing&lt;/code&gt; and &lt;code&gt;didProcessEditing&lt;/code&gt; methods. After changing the text, printing the text storage&amp;#8217;s content in &lt;code&gt;willProcessEditing&lt;/code&gt; will result in this single text section with uniform attributes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Hello 漢字{
    NSColor = &quot;Catalog color: System textColor&quot;;
    NSFont = &quot;\&quot;Helvetica 12.00 pt. P [] (0x7f85d9f60070)
        fobj=0x7f85d9f4c320, spc=3.33\&quot;&quot;;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And then in &lt;code&gt;didProcessEditing&lt;/code&gt; you will see it was split in two text sections with different font attributes:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Hello {
    NSColor = &quot;Catalog color: System textColor&quot;;
    NSFont = &quot;\&quot;Helvetica 12.00 pt. P [] (0x7fbdc15a25c0)
        fobj=0x7fbdbec6a0d0, spc=3.33\&quot;&quot;;
}漢字{
    NSColor = &quot;Catalog color: System textColor&quot;;
    NSFont = &quot;\&quot;HiraginoSans-W3 12.00 pt. P [] (0x7fbdc15b2330)
        fobj=0x7fbdc15adbe0, spc=4.00\&quot;&quot;;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The font was changed for the characters not representable in Helvetica to ensure they can still be shown. Font substitution at work!&lt;/p&gt;

&lt;p&gt;Perhaps however our app wants to control the font in the text view in order to replace whatever style could come from the user pasting some text. Those delegate methods sure seem like a good place to do that, and they are.&lt;/p&gt;

&lt;p&gt;It is important to know however that there&amp;#8217;s a crucial difference between changing the font in &lt;code&gt;willProcessEdting&lt;/code&gt; and in &lt;code&gt;didProcessEditing&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;willProcessEditing&lt;/code&gt; is called before font substitution. Any font you set while in &lt;code&gt;willProcessEditing&lt;/code&gt; will get substituted with an appropriate font for characters not available in the font you choose.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;didProcessEditing&lt;/code&gt; is called after font substitution. If you change the font while in &lt;code&gt;didProcessEditing&lt;/code&gt; there will be no further font substitution, and thus you should make sure the font you set can display all the characters.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, if you have to change the font after the text storage was edited, do it in &lt;code&gt;willProcessEditing&lt;/code&gt; and it&amp;#8217;ll do the right thing. Don&amp;#8217;t do it in &lt;code&gt;didProcessEditing&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s also important to note that you can change the font in the text storage without manipulating the text storage directly (such as in &lt;code&gt;textView.font = myFont&lt;/code&gt;). The same rule apply: do it in &lt;code&gt;willProcessEditing&lt;/code&gt; because if you do it from &lt;code&gt;didProcessEditing&lt;/code&gt; no font substitution will occur and you can end up with characters not showing up.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>macOS Catalina: Authorize Screen Recording</title>
	<link href="https://michelf.ca/blog/2019/catalina-authorize-screen-recording"/>
		<id>tag:michelf.ca,2019:/blog/2019/catalina-authorize-screen-recording/</id>
		<updated>2019-10-11T22:34:00-04:00</updated>
	<content type="html">
&lt;p&gt;macOS Catalina brings tighter security in various ways. One change is about preventing apps from seeing what&amp;#8217;s on your screen. Apps that want to do that now require a special authorization from the user. This includes two of my apps: &lt;a href=&quot;/projects/mac/sim-daltonism/&quot;&gt;Sim Daltonism&lt;/a&gt; and &lt;a href=&quot;/software/mac/red-stripe/&quot;&gt;Red Stripe&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The first time you open the app, macOS will tell you it wants to record the screen and will offer to open System Preferences. Until authorized in System Preferences, all the app can see is your desktop picture.&lt;/p&gt;

&lt;p&gt;You can open System Preferences from the alert shown by macOS when you first open the app, which will bring you exactly at the right place. Otherwise, you can go there by choosing System Preferences from the Apple menu: from there, open the Security &amp;amp; Privacy pane, choose the Privacy tab, and select the the Screen Recording category.&lt;/p&gt;

&lt;div class=&quot;panorama&quot;&gt;
&lt;img src=&quot;/img/2019/EN-security-privacy-icon.png&quot; width=&quot;88&quot; height=&quot;86&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;/img/2019/EN-privacy-screen-recording.png&quot; width=&quot;780&quot; height=&quot;685&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;You will see a list of apps that requested the ability to record the screen. Check the ones you want to authorize. You might be prompted to quit the app so the setting takes effect; this is unnecessary in the case of Sim Daltonism and Red Stripe but might be needed for other apps.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>Black Light Pro 1.1 on the App Store</title>
	<link href="https://michelf.ca/blog/2019/black-light-pro-1.1-app-store"/>
		<id>tag:michelf.ca,2019:/blog/2019/black-light-pro-1.1-app-store/</id>
		<updated>2019-09-17T17:00:00-04:00</updated>
	<content type="html">
&lt;p&gt;The short version of this post is that &lt;a href=&quot;/software/black-light-pro/&quot;&gt;Black Light Pro&lt;/a&gt; 1.1 is out, and is &lt;a href=&quot;https://apps.apple.com/us/app/black-light-pro/id1479838583?l=en&amp;amp;ls=1&amp;amp;mt=12&quot;&gt;now available on the Mac App Store&lt;/a&gt;. If you&amp;#8217;re interested in the story behind this, read below.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Last year when I was developing Black Light Pro, I intended it to be available on the App Store as well as directly from my website, like all my other apps. Things don&amp;#8217;t always work as intended though. The App Store is famous for its strict sandboxing requirements, disallowing access to many functions of the OS in the name of security. One of these is for changing the current color profile of the screen.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;There&amp;#8217;s two ways really the operating system lets us affect how colors are rendered on a screen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You can directly change the display transfer table and it&amp;#8217;ll have an instantaneous effect. It&amp;#8217;s a bit fragile too because many things can reset this transfer table unexpectedly, like the display waking from sleep, plugging a secondary screen, other apps quitting, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can change the color profile of a screen. The color profile tells many things about a screen, one of them is the display transfer table the operating system should use. When the transfer table applied in method #1 gets reset, it becomes whatever is in the screen&amp;#8217;s color profile. This makes the profile the ideal place to apply a long-lasting effect.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In Black Light I always used method #1. For Black Light Pro I wanted to use #2 to make the effect more robust by changing the screen&amp;#8217;s profile while the app is running. This is better because it avoids the flashes of &amp;#8220;normal&amp;#8221; colors that happen whenever the transfer table is reset.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;So, the sandbox got in the way. Since you can&amp;#8217;t change the color profile of a screen from a sandboxed app, that feature was out for the Mac App Store version. The app would still work inside the sandbox, but changing the profile wouldn&amp;#8217;t. I didn&amp;#8217;t want to remove the feature (because it truly makes things better), and I did not want to make one version sandboxed and the other not for various reasons. In the end, I released it only on my website.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;A few months ago, it came to my attention that Black Light Pro would sometimes crash unexpectedly. This would manifest by the app disappearing from the menu bar and scheduled effects no longer triggering. From the crash logs it looked related to the code for changing the profile.&lt;/p&gt;

&lt;p&gt;I couldn&amp;#8217;t figure out exactly how to reproduce it, but it seems like a reference counting problem with a value returned from one of the function calls needed to change the profile. Not sure if I could do something about it (the bug could be on Apple&amp;#8217;s side), I decided to move the profile-management code to a separate process: if that separate process crashes, then a new one could be re-spawned and continue where the other left. It&amp;#8217;s fault-tolerant now.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;This complicated bug fix has an interesting effect: it makes it possible to sandbox the main process. If the main process is sandboxed, that means it can go on the Mac App Store&amp;#8230; as long as the profile management process is not included. And that&amp;#8217;s what I&amp;#8217;ve done for 1.1.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;m a bit proud now to announce Black Light Pro is now available on the App Store. Also the color profile functionality is more robust now in the direct version.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>Gamma Board 1.3: Presets</title>
	<link href="https://michelf.ca/blog/2019/gamma-board-presets"/>
		<id>tag:michelf.ca,2019:/blog/2019/gamma-board-presets/</id>
		<updated>2019-09-02T19:55:00-04:00</updated>
	<content type="html">
&lt;p class=&quot;picture side-note&quot;&gt;&lt;img src=&quot;/img/design/gamma-board/shot-presets.png&quot; width=&quot;240&quot; height=&quot;426&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s a new version of &lt;a href=&quot;/software/gamma-board/&quot;&gt;Gamma Board&lt;/a&gt; out today with new features helping
you color-manage screens from a distance. Three highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Presets&lt;/strong&gt; are a new feature allowing you to save and restore settings for
screens and groups. Tap the sliders icon in the setting panel to create
or apply a new preset.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Propagation&lt;/strong&gt; of a group settings to all the screen settings. Tap the group
icon at the top of the group settings and you&amp;#8217;ll be offered to merge the
group settings into each individual screen settings. You can also reset
individual settings for all the screens in the group in the same way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;document browser&lt;/strong&gt; has been changed to use the standard iOS document
browser (if running on iOS 11 or later). You can now save set documents on
iCloud, locally on the device, or using other storage services.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gamma Board 1.3 also includes a couple of minor bug fixes.&lt;/p&gt;

&lt;p&gt;You can download it &lt;a href=&quot;https://itunes.apple.com/us/app/gamma-board/id1247128865?ls=1&amp;amp;mt=8&amp;amp;l=en&quot;&gt;from the App Store&lt;/a&gt; for $79.99&amp;#160;&lt;small&gt;USD&lt;/small&gt; — a 20% reduction. Or request a &lt;a href=&quot;/software/gamma-board/branding/&quot;&gt;custom branded version&lt;/a&gt; for your organization.&lt;/p&gt;

	</content>
</entry>
<entry>
	<title>Gamma Control 6.3: Color Profiles</title>
	<link href="https://michelf.ca/blog/2019/gamma-control-color-profiles"/>
		<id>tag:michelf.ca,2019:/blog/2019/gamma-control-color-profiles/</id>
		<updated>2019-09-02T19:54:00-04:00</updated>
	<content type="html">
&lt;p&gt;One feature that has been requested for a long time in &lt;a href=&quot;https://michelf.ca/projects/gamma-control/&quot;&gt;Gamma Control&lt;/a&gt; is the
ability to create a color profile. Now it&amp;#8217;s there. If you choose a color
profile in System Preferences, in the Screens pane, the operating system takes
charge of applying the gamma correction curve you&amp;#8217;ve chosen in Gamma Control.&lt;/p&gt;

&lt;p&gt;So in Gamma Control 6.3 you can calibrate your screen, export a profile, select
it in System Preferences, and never have to open Gamma Control again. Yeah!&lt;/p&gt;

&lt;p&gt;This feature is mysteriously unavailable during the free trial though, so
you&amp;#8217;ll need a purchased copy of the app.&lt;/p&gt;

	</content>
</entry>
 
</feed>

