mirror of
https://github.com/neon443/ShhShell.git
synced 2026-11-30 12:44:51 +00:00
add a border to ansipicker, and fix the corner radius
fix light themes having unreadable text added a luminance property to calculate the brighness of the bg color if its > 0.5, choose a light theme to get black text
This commit is contained in:
4 files changed
+41
-23
No files matched your search
@@ -55,3 +55,12 @@ extension SwiftTerm.Color {
|
||||
return UIColor(red: red, green: green, blue: blue, alpha: 1)
|
||||
}
|
||||
}
|
||||
|
||||
extension SwiftTerm.Color {
|
||||
var luminance: Double {
|
||||
let r = Double(red)/65535
|
||||
let g = Double(green)/65535
|
||||
let b = Double(blue)/65535
|
||||
return (0.2126*r + 0.7152*g + 0.0722*b)
|
||||
}
|
||||
}
|
||||