xtd
0.2.0
Loading...
Searching...
No Matches
◆
average()
[1/2]
static
color
xtd::drawing::color::average
(
const
color
&
color1
,
const
color
&
color2
,
double
weight
)
static
noexcept
Returns the weighted average color between the two given colors.
Parameters
color1
The first color.
color2
The second color.
weight
The weighting factor
Returns
The average color.
Remarks
The alpha of color1 is conserved.
The red, green and blue values are averages using the following formula:
color
= color1 * (1 - weight) + color2 * weight;
xtd::drawing::color
Represents an ARGB (alpha, red, green, blue) color.
Definition
color.h:49
Thus, a weight value of
1.0
will return the second color, while a value of
0.0
will return the first color.
Deprecated:
Replaced by
xtd::drawing::color_converter::average
- Will be removed in version 0.4.0
xtd
drawing
color
Generated on Sat Sep 14 2024 21:25:19 for xtd by
Gammasoft
. All rights reserved.