Skip to content

Instantly share code, notes, and snippets.

@JRHeaton
Created January 3, 2014 21:58
Show Gist options
  • Save JRHeaton/8247440 to your computer and use it in GitHub Desktop.
Save JRHeaton/8247440 to your computer and use it in GitHub Desktop.
JBP:~ John$ cat c.m
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <AppKit/AppKit.h>
int main() {
@autoreleasepool {
NSLog(@"%@", @[ (id)[NSColor blueColor].CGColor ]);
}
}JBP:~ John$ clang c.m -o c -framework Foundation -framework AppKit
JBP:~ John$ ./c
2014-01-03 16:58:22.404 c[1066:507] (
"<CGColor 0x7fbed04126c0> [<CGColorSpace 0x7fbed04125a0> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; Generic RGB Profile)] ( 0 0 1 1 )"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment