Class: CIColor
Overview
Class Method Summary (collapse)
-
+ colorWithCGColor:
Creates a color object from a Quartz color.
-
+ colorWithRed:green:blue:
Creates a color object using the specified RGB color component values.
-
+ colorWithRed:green:blue:alpha:
Creates a color object using the specified RGBA color component values.
-
+ colorWithString:
Creates a color object using the RGBA color component values specified by a string.
Instance Method Summary (collapse)
-
- alpha
Returns the alpha value of the color.
-
- blue
Returns the blue component of the color.
-
- colorSpace
Returns the Quartz 2D color space associated with the color.
-
- components
Returns the color components of the color.
-
- green
Returns the green component of the color.
-
- initWithCGColor:
Initializes a color object with a Quartz color.
-
- numberOfComponents
Returns the number of color components in the color.
-
- red
Returns the red component of the color.
-
- stringRepresentation
Returns a formatted string that specifies the components of the color.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Class Method Details
+ (CIColor) colorWithCGColor(c)
Creates a color object from a Quartz color. A CGColorRef object is the fundamental opaque data type used internally by Quartz to represent colors. For more information on Quartz 2D color and color spaces, see Quartz 2D Programming Guide.You can pass a CGColorRef object that represents any color space, including CMYK, but Core Image converts all color spaces to the Core Image working color space before it passes the color space to the filter kernel. The Core Image working color space uses three color components plus alpha.
+ (CIColor) colorWithRed(r, green:g, blue:b)
Creates a color object using the specified RGB color component values
+ (CIColor) colorWithRed(r, green:g, blue:b, alpha:a)
Creates a color object using the specified RGBA color component values.
+ (CIColor) colorWithString(representation)
Creates a color object using the RGBA color component values specified by a string.
Instance Method Details
- (Float) alpha
Returns the alpha value of the color.
- (Float) blue
Returns the blue component of the color.
- (CGColorSpaceRef) colorSpace
Returns the Quartz 2D color space associated with the color.
- (const CGFloat) components
Returns the color components of the color.
- (Float) green
Returns the green component of the color.
- (Object) initWithCGColor(c)
Initializes a color object with a Quartz color. A CGColorRef object is the fundamental opaque data type used internally by Quartz to represent colors. For more information on Quartz 2D color and color spaces, see Quartz 2D Programming Guide.You can pass a CGColorRef object that represents any color space, including CMYK, but Core Image converts all color spaces to the Core Image working color space before it passes the color space to the filter kernel. The Core Image working color space uses three color components plus alpha.
- (size_t) numberOfComponents
Returns the number of color components in the color.
- (Float) red
Returns the red component of the color.
- (String) stringRepresentation
Returns a formatted string that specifies the components of the color. The string representation always has four components—red, green, blue, and alpha. The default value for the alpha component is 1.0.F or example, this string:@“0.5 0.7 0.3 1.0”indicates an RGB color whose components are 50% red, 70% green, 30% blue, and 100% opaque (alpha value of 1.0).