mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Remove isDark NSColor category method
This commit is contained in:
@@ -2,5 +2,4 @@
|
||||
+ (NSColor*)colorWithString:(NSString*)aString;
|
||||
+ (NSColor*)tmColorWithCGColor:(CGColorRef)aColor;
|
||||
- (CGColorRef)tmCGColor;
|
||||
- (BOOL)isDark;
|
||||
@end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user