color(_:white:opacity:)
Returns a shading instance that fills with a monochrome color in the given color space.
Declaration
static func color(_ colorSpace: Color.RGBColorSpace = .sRGB, white: Double, opacity: Double = 1) -> GraphicsContext.ShadingParameters
- colorSpace:
The RGB color space used to define the color. The default is Srgb.
- white:
The value to use for each of the red, green, and blue components of the color.
- opacity:
The opacity of the color. The default is
1, which means fully opaque.
Return Value
A shading instance filled with a color.