This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onVisibilityChange(callback) { | |
let visible = true; | |
const focused = () => { | |
if (!visible) callback((visible = true)); | |
} | |
const unfocused = () => { | |
if (visible) callback((visible = false)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
print("\n/* -------------- System Colors -------------- */") | |
// See: https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/color/#system-colors | |
print("systemBlue:", NSColor.systemBlue.rgbaCssString) | |
print("systemBrown:", NSColor.systemBrown.rgbaCssString) | |
print("systemGray:", NSColor.systemGray.rgbaCssString) | |
print("systemGreen:", NSColor.systemGreen.rgbaCssString) | |
print("systemIndigo:", NSColor.systemIndigo.rgbaCssString) |