Remove isDark NSColor category method

This commit is contained in:
Allan Odgaard
2013-03-10 16:11:25 +01:00
parent e6e281cae9
commit 2b0acf9677
2 changed files with 0 additions and 11 deletions

View File

@@ -2,5 +2,4 @@
+ (NSColor*)colorWithString:(NSString*)aString;
+ (NSColor*)tmColorWithCGColor:(CGColorRef)aColor;
- (CGColorRef)tmCGColor;
- (BOOL)isDark;
@end

View File

@@ -37,14 +37,4 @@
CGColorSpaceRelease(colorSpace);
return (CGColorRef)[(id)res autorelease];
}
- (BOOL)isDark
{
uint32_t r(lroundf(255 * [self redComponent]));
uint32_t g(lroundf(255 * [self greenComponent]));
uint32_t b(lroundf(255 * [self blueComponent]));
uint32_t intensity = r*r*30 + g*g*59 + b*b*11;
return intensity < 50*255*255;
}
@end