Add +[NSColor colorWithSRGBRed]

This commit is contained in:
TheBrokenRail 2021-05-26 17:19:29 -04:00
parent c9b4a96280
commit b21618f5d2
2 changed files with 16 additions and 0 deletions

View File

@ -562,6 +562,18 @@ NSString *const NSSystemColorsDidChangeNotification = @"NSSystemColorsDidChangeN
spaceName: NSDeviceRGBColorSpace];
}
+ (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

View File

@ -97,6 +97,10 @@ APPKIT_EXPORT NSString *const NSSystemColorsDidChangeNotification;
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