mirror of
https://github.com/neon443/ShhShell.git
synced 2026-11-30 12:44:51 +00:00
redid logic on the shellview selection
fixed the colours being unreadable sometimes on title bar of the shellview luminance ratio func forcedismissdisconnectedalert is now in handler
This commit is contained in:
1 parent
a71c994103
commit
7e0a02fad3
7 files changed
+66
-51
No files matched your search
@@ -80,4 +80,12 @@ extension SwiftTerm.Color {
|
||||
let b = Double(blue)/65535
|
||||
return (0.2126*r + 0.7152*g + 0.0722*b)
|
||||
}
|
||||
|
||||
func luminanceRatio(with other: SwiftTerm.Color) -> Double {
|
||||
if self.luminance > other.luminance {
|
||||
return (self.luminance + 0.05) / (other.luminance + 0.05)
|
||||
} else {
|
||||
return (other.luminance + 0.05) / (self.luminance + 0.05)
|
||||
}
|
||||
}
|
||||
}
|
||||