zeitlings Posted August 20, 2023 Share Posted August 20, 2023 Pick a color to get its hex, rgba, hsl representation or NSColor initializer. Usage Activate the Color Sampler with the keyword (default: cp) and pick the desired color. Color History To review previously picked colors, activate the workflow with the keyword preceded by a colon (default: :cp). pseudometa, yinan, Belfong and 1 other 3 1 Link to comment
zeitlings Posted April 4 Author Share Posted April 4 v1.2.0 implements the new grid view for the color history yinan and JJJJ 2 Link to comment
Textdriven Posted April 18 Share Posted April 18 (edited) Am i missing something? I type cp and hit enter. Nothing appears. Alfred 5.5, macOS Version 14.4.1 (23E224) [2:22:24.177 PM] Color Picker[Keyword] Processing complete [2:22:24.183 PM] Color Picker[Keyword] Passing output '' to Script Filter [2:22:24.195 PM] Color Picker[Script Filter] Queuing argument '(null)' If i run :cp [2:25:47.841 PM] Color Picker[Keyword] Passing output '' to Automation Task [2:25:47.843 PM] ERROR: Color Picker[Automation Task] Task Argument Error: Expecting single or multiple inputs. Warnings: ( "Passed in file '/Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.zeitlings.colorpicker' does not exist, discarding" Edited April 18 by Textdriven Link to comment
zeitlings Posted April 20 Author Share Posted April 20 (edited) Hey @Textdriven Unfortunately, there is no error message in the logs to suggest a solution. :cp doesn’t work because there is no color history to show yet. The only thing I can think of is this: The script is compiled on your device the first time you run the workflow. This seems to be required since macOS 14. For this to work, you may still need to install the Xcode command line tools to run the swiftc command that compiles the swift code into an executable. This can be done by running the following command in the terminal: xcode-select --install However, if I'm not mistaken, macOS should have prompted you with a popup asking you to install the command line tools if they are not present 🤷♂️ Edited April 20 by zeitlings Link to comment
clement Posted Friday at 08:25 PM Share Posted Friday at 08:25 PM (edited) I'm getting this error: [14:23:10.784] Color Picker[Keyword] Processing complete [14:23:10.786] Color Picker[Keyword] Passing output '' to Script Filter [14:23:10.788] Color Picker[Script Filter] Queuing argument '(null)' [14:23:11.406] Color Picker[Script Filter] Script with argv '(null)' finished [14:23:11.408] ERROR: Color Picker[Script Filter] Code 127: ColorPicker.swift:78:13: error: use of undeclared type 'FloatingPointFormatStyle' let pfms: FloatingPointFormatStyle<CGFloat> = .init(locale: Locale(identifier: "en_US")).precision(.fractionLength(5)) ^~~~~~~~~~~~~~~~~~~~~~~~ ColorPicker.swift:87:18: error: no exact matches in call to initializer let url: URL = URL(filePath: "\(cache)/\(hex).png") ^ Foundation.URL:12:12: note: incorrect labels for candidate (have: '(filePath:)', expected: '(fileURLWithPath:)') public init(fileURLWithPath path: __shared String) ^ Foundation.URL:2:12: note: incorrect labels for candidate (have: '(filePath:)', expected: '(fileReferenceLiteralResourceName:)') public init(fileReferenceLiteralResourceName name: String) ^ /Users/clementrousseau/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/1A4D2298-2D48-42DB-97C0-D53AB465EEB2:2: no such file or directory: ./ColorPicker MacOS: 12.5.1 Alfred: 5.5 Edited Friday at 08:27 PM by clement Formatting code Link to comment
zeitlings Posted Friday at 11:54 PM Author Share Posted Friday at 11:54 PM 3 hours ago, clement said: MacOS: 12.5.1 Your OS is too old for at least one of the functions called here. I'll check if I can add support for macOS 12. Link to comment
zeitlings Posted yesterday at 04:45 PM Author Share Posted yesterday at 04:45 PM @clement You can try again now with the updated version from Github. Let me know if it works! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now