iamnewton Posted July 8, 2014 Share Posted July 8, 2014 I'm trying to programmatically set up some themes from a color palette I've found online. There are several variations of this color scheme that I'd like to convert to Alfred themes. The colors from the theme come in any format understood by the web, (rgb, hex, etc) but the color in the preference file looks like a datauri or something I can't figure out. Link to comment
Tyler Eich Posted July 9, 2014 Share Posted July 9, 2014 (edited) I believe it's a data representation used by Objective-C in plist files. I'm not aware of any way to parse the color data (except to load the color data back into an Objective-C program) You could use the NSColor class to convert eg RGB to a native color representation, which should be able to be written to the plist. And of course, manipulating Alfred's hidden files directly is highly discouraged, as Alfred's stability depends in part on the integrity of these files. Edited July 9, 2014 by Tyler Eich Link to comment
iamnewton Posted July 9, 2014 Author Share Posted July 9, 2014 @Tyler, okay, does Alfred sync the appearances and themes? Yeah, I'm not trying to change the hidden files, I'm trying to create a set of themes programmatically from a set of RGB/HEX values. Link to comment
jdfwarrior Posted July 10, 2014 Share Posted July 10, 2014 @Tyler, okay, does Alfred sync the appearances and themes? Yeah, I'm not trying to change the hidden files, I'm trying to create a set of themes programmatically from a set of RGB/HEX values. Alfred does sync themes but not which all Appearance settings. This allows you to set a different theme per machine if you use multiple and not always being forced into the exact same settings Link to comment
iamnewton Posted July 10, 2014 Author Share Posted July 10, 2014 Okay, so is there a way then to force the setting through some sort of command line setting? I want to convert a theme i found online (http://chriskempson.github.io/base16/) into Alfred profiles without having to manually pick and choose like I did for the first. I can use a builder script that they have but I need to find a way to convert the hex or web color base into something that alfred will understand for the appearance file. Link to comment
Tyler Eich Posted July 10, 2014 Share Posted July 10, 2014 You could use the color scheme to generate an Alfred theme URL. For an example of what format to use, go into Alfred Preferences > Appearance, choose the theme you'd like to base the rest on, hit the "Share" button at the bottom, and choose "Copy Theme URL". Paste it somewhere and you'll have a pretty good idea of how to generate a theme URL 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