forked from Fingertips/ColorPicker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNSColorAdditions.h
More file actions
27 lines (21 loc) · 745 Bytes
/
NSColorAdditions.h
File metadata and controls
27 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#import <Cocoa/Cocoa.h>
@interface NSColor (Additions)
+(NSColor *)colorFromString:(NSString *)colorRepresentation;
// Compacts a regular hex6 string where possible.
//
// I.e. this can be compacted:
// "#ff0000" => "#f00"
//
// This, however, can not be compacted:
// "#cbb298" => "#cbb298"
-(NSString *)toHexString;
-(NSString *)toHexStringWithoutHash;
-(NSString *)toRGBString:(BOOL)shortVersion;
-(NSString *)toRGBAString:(BOOL)shortVersion;
-(NSString *)toHSLString:(BOOL)shortVersion;
-(NSString *)toHSLAString:(BOOL)shortVersion;
-(NSString *)toObjcNSColor:(BOOL)shortVersion;
-(NSString *)toMacRubyNSColor:(BOOL)shortVersion;
-(NSString *)toObjcUIColor:(BOOL)shortVersion;
-(NSString *)toMotionUIColor:(BOOL)shortVersion;
@end