assure color is in RGB color space vefore calculating inverse

This commit is contained in:
Riccardo Mottola 2021-02-11 12:01:48 +01:00
parent 59a0afd3df
commit 6544ff872e

View file

@ -157,7 +157,8 @@
[ev setEditable:_isEditable];
prefs = [[_editorManager projectManager] prefController];
bSelCol = [prefs colorForKey:EditorSelectionColor];
bSelCol = [prefs colorForKey:EditorSelectionColor defaultValue:[NSColor blackColor]];
bSelCol = [bSelCol colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]];
tSelCol = [NSColor colorWithCalibratedRed: 1.0 - [bSelCol redComponent]
green: 1.0 - [bSelCol greenComponent]
blue: 1.0 - [bSelCol blueComponent]