CGColor Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CGColor(IntPtr) | |
CGColor(String) | |
CGColor(CGColor, nfloat) |
Creates a color from an existing color, using the specified alpha value. |
CGColor(CGColorSpace, nfloat[]) |
Creates a color on a colorspace, with the specified components. |
CGColor(nfloat, nfloat) |
Creates a color from a grey value and an alpha value. |
CGColor(CGColorSpace, CGPattern, nfloat[]) |
Creates a color using the specified colorspace, pattern and components. |
CGColor(nfloat, nfloat, nfloat) |
Creates a color from red, green and blue components. |
CGColor(nfloat, nfloat, nfloat, nfloat) |
Creates a color from red, green, blue and alpha components. |
CGColor(IntPtr)
public CGColor (IntPtr handle);
new CoreGraphics.CGColor : nativeint -> CoreGraphics.CGColor
Parameters
- handle
-
IntPtr
nativeint
Applies to
CGColor(String)
public CGColor (string name);
new CoreGraphics.CGColor : string -> CoreGraphics.CGColor
Parameters
- name
- String
Applies to
CGColor(CGColor, nfloat)
Creates a color from an existing color, using the specified alpha value.
public CGColor (CoreGraphics.CGColor source, nfloat alpha);
new CoreGraphics.CGColor : CoreGraphics.CGColor * nfloat -> CoreGraphics.CGColor
Parameters
- source
- CGColor
Reference color to use.
- alpha
- nfloat
Alpha value from 0.0f to 1.0f.
Applies to
CGColor(CGColorSpace, nfloat[])
Creates a color on a colorspace, with the specified components.
public CGColor (CoreGraphics.CGColorSpace colorspace, nfloat[] components);
new CoreGraphics.CGColor : CoreGraphics.CGColorSpace * nfloat[] -> CoreGraphics.CGColor
Parameters
- colorspace
- CGColorSpace
- components
- nfloat[]
Color intensities one per channel in the color space. It should include the alpha channel.
Remarks
If any of the values in the components is outside the range for the component, the value is clamped.
Applies to
CGColor(nfloat, nfloat)
CGColor(CGColorSpace, CGPattern, nfloat[])
Creates a color using the specified colorspace, pattern and components.
public CGColor (CoreGraphics.CGColorSpace colorspace, CoreGraphics.CGPattern pattern, nfloat[] components);
new CoreGraphics.CGColor : CoreGraphics.CGColorSpace * CoreGraphics.CGPattern * nfloat[] -> CoreGraphics.CGColor
Parameters
- colorspace
- CGColorSpace
- pattern
- CGPattern
Pattern to use.
- components
- nfloat[]
Color intensities one per channel in the color space. It should include the alpha channel.
Applies to
CGColor(nfloat, nfloat, nfloat)
Creates a color from red, green and blue components.
public CGColor (nfloat red, nfloat green, nfloat blue);
new CoreGraphics.CGColor : nfloat * nfloat * nfloat -> CoreGraphics.CGColor
Parameters
- red
- nfloat
Red value 0.0f to 1.0f.
- green
- nfloat
Green value from 0.0f to 1.0f.
- blue
- nfloat
Blue value from 0.0f to 1.0f.
Applies to
CGColor(nfloat, nfloat, nfloat, nfloat)
Creates a color from red, green, blue and alpha components.
public CGColor (nfloat red, nfloat green, nfloat blue, nfloat alpha);
new CoreGraphics.CGColor : nfloat * nfloat * nfloat * nfloat -> CoreGraphics.CGColor
Parameters
- red
- nfloat
Red value from 0.0f to 1.0f.
- green
- nfloat
Green value from 0.0f to 1.0f.
- blue
- nfloat
Blue value from 0.0f to 1.0f.
- alpha
- nfloat
Alpha value from 0.0f to 1.0f.