ColorExtensionsBlend(PColor32, PColor32, WorkingColorSpace) Method

Blends the specified foreColor and backColor in the specified colorSpace. It returns foreColor if it has no transparency (that is, when A is 255); otherwise, the result of the blending.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.1.1
C#
public static PColor32 Blend(
	this PColor32 foreColor,
	PColor32 backColor,
	WorkingColorSpace colorSpace
)

Parameters

foreColor  PColor32
The covering color to blend with backColor.
backColor  PColor32
The background color to be covered with foreColor.
colorSpace  WorkingColorSpace
The color space to be used for the blending. If Default, then the sRGB color space will be used. For performance reasons this method does not validate this parameter. For undefined values the sRGB color space will be used as well.

Return Value

PColor32
foreColor if it has no transparency; otherwise, the result of the blending.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PColor32. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also