Skip to content

Commit 3f3aef3

Browse files
committed
Revert "color profile"
This reverts commit b44dd00.
1 parent b44dd00 commit 3f3aef3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/TextDiff/AppKit/DiffTokenLayouter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ enum DiffTokenLayouter {
239239
}
240240

241241
private static func adaptiveChipTextColor(for fillColor: NSColor) -> NSColor {
242-
let rgb = fillColor.usingColorSpace(.sRGB) ?? fillColor
242+
let rgb = fillColor.usingColorSpace(.deviceRGB) ?? fillColor
243243
let luminance = (0.2126 * rgb.redComponent) + (0.7152 * rgb.greenComponent) + (0.0722 * rgb.blueComponent)
244244
if luminance > 0.55 {
245245
return NSColor.black.withAlphaComponent(0.9)

Tests/TextDiffTests/TextDiffEngineTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ private func expectColorEqual(_ lhs: NSColor, _ rhs: NSColor, tolerance: CGFloat
456456
}
457457

458458
private func rgba(_ color: NSColor) -> (CGFloat, CGFloat, CGFloat, CGFloat) {
459-
let rgb = color.usingColorSpace(.sRGB) ?? color
459+
let rgb = color.usingColorSpace(.deviceRGB) ?? color
460460
return (rgb.redComponent, rgb.greenComponent, rgb.blueComponent, rgb.alphaComponent)
461461
}
462462

0 commit comments

Comments
 (0)