mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 04:00:00 +00:00
Merge pull request #17 from TheBrokenRail/add-more-nscolor
Add ``+[NSColor colorWithSRGBRed]`` And ``+[NSColor colorWithRed]``
This commit is contained in:
commit
455320e98a
@ -562,6 +562,29 @@ NSString *const NSSystemColorsDidChangeNotification = @"NSSystemColorsDidChangeN
|
||||
spaceName: NSDeviceRGBColorSpace];
|
||||
}
|
||||
|
||||
+ (NSColor *) colorWithRed: (CGFloat) red
|
||||
green: (CGFloat) green
|
||||
blue: (CGFloat) blue
|
||||
alpha: (CGFloat) alpha
|
||||
{
|
||||
return [NSColor colorWithDeviceRed: red
|
||||
green: green
|
||||
blue: blue
|
||||
alpha: alpha];
|
||||
}
|
||||
|
||||
+ (NSColor *) colorWithSRGBRed: (CGFloat) red
|
||||
green: (CGFloat) green
|
||||
blue: (CGFloat) blue
|
||||
alpha: (CGFloat) alpha
|
||||
{
|
||||
return [NSColor_CGColor colorWithRed: red
|
||||
green: green
|
||||
blue: blue
|
||||
alpha: alpha
|
||||
spaceName: NSNamedColorSpace];
|
||||
}
|
||||
|
||||
+ (NSColor *) colorWithDeviceHue: (CGFloat) hue
|
||||
saturation: (CGFloat) saturation
|
||||
brightness: (CGFloat) brightness
|
||||
|
@ -97,6 +97,14 @@ APPKIT_EXPORT NSString *const NSSystemColorsDidChangeNotification;
|
||||
green: (CGFloat) green
|
||||
blue: (CGFloat) blue
|
||||
alpha: (CGFloat) alpha;
|
||||
+ (NSColor *) colorWithRed: (CGFloat) red
|
||||
green: (CGFloat) green
|
||||
blue: (CGFloat) blue
|
||||
alpha: (CGFloat) alpha;
|
||||
+ (NSColor *) colorWithSRGBRed: (CGFloat) red
|
||||
green: (CGFloat) green
|
||||
blue: (CGFloat) blue
|
||||
alpha: (CGFloat) alpha;
|
||||
+ (NSColor *) colorWithDeviceHue: (CGFloat) hue
|
||||
saturation: (CGFloat) saturation
|
||||
brightness: (CGFloat) brightness
|
||||
|
Loading…
Reference in New Issue
Block a user