Skip to content
Snippets Groups Projects
Commit fad75b99 authored by George Nachman's avatar George Nachman
Browse files

Allow triggers colors in a profile to use #rrggbb notation so dynamic

profiles are sensible.
parent ecf3053c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -31,6 +31,9 @@ CGFloat PerceivedBrightness(CGFloat r, CGFloat g, CGFloat b) {
@implementation NSColor (iTerm)
 
+ (NSColor *)colorWithString:(NSString *)s {
if ([s hasPrefix:@"#"] && s.length == 7) {
return [self colorFromHexString:s];
}
NSData *data = [[[NSData alloc] initWithBase64EncodedString:s options:0] autorelease];
if (!data.length) {
return nil;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment