COLOUR Property Type
The COLOUR property supports many different colour formats or types, including HEX, RGB, HSV, macOS Colours and used-defined Colour Constants.
HEX
Hexadecimal:
#RRGGBB
"colour": "#0000ff"
Alpha also supported:
#RRGGBBAA
"colour": "#0000ff44"
RGB
Red Green Blue:
rgb(red: 0-255, green: 0-255, blue: 0-255)
"colour": "rgb(0, 0, 255)"
Alpha also supported:
rgb(red: 0-255, green: 0-255, blue: 0-255, alpha: 0.0-1.0)
"colour": "rgb(0, 0, 255, 0.3)"
HSV
Hue Saturation Value:
hsv(degrees: 0-359, saturation: 0-100, brightness: 0-100).
"colour": "hsv(280, 50, 100)"
Alpha also supported
hsv(degrees: 0-359, saturation: 0-100, brightness: 0-100, alpha: 0.0-1.0).
"colour": "hsv(280, 50, 100, 0.3)"
Colour Constants
User-defined colour constants for use throughout an Alfred UI can be defined in the top level colours key in ui.json.
If the following colour constant has been defined in ui.json:
"colours": {
"bananarama": "#FFE135"
}
This colour can be used as an e.g. background colour to a view:
"background": "bananarama"
Alfred Colours
Alfred UI also introduces some standard colour constants:
alfredSelectedResultTextColor The current theme selected result colour.
alfredSelectedResultBackgroundColor The current theme selected result backgrounnd colour.
NoteThe constants have US English spelling to match the macOS Colours.
macOS Colours
The Apple, Developer and Crayons colour constants from macOS can be used, including adaptable colours.
Adaptable colours automatically adjust for light and dark vibrancy and accessibility.
"colour": "systemOrangeColor"