Class SKColorExtensions
A static class providing SKColor extensions
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public static class SKColorExtensions
Methods
Darken(SKColor, float)
Darkens the color by the specified amount
Declaration
public static SKColor Darken(this SKColor c, float amount)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | c | The color to darken |
| float | amount | The brightness of the new color |
Returns
| Type | Description |
|---|---|
| SKColor | The darkened color |
Interpolate(SKColor, SKColor, float)
Interpolates a color between the from and to color.
Declaration
public static SKColor Interpolate(this SKColor from, SKColor to, float progress)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | from | The first color |
| SKColor | to | The second color |
| float | progress | A value between 0 and 1 |
Returns
| Type | Description |
|---|---|
| SKColor | The interpolated color |
Sum(SKColor, SKColor)
Adds the two colors together
Declaration
public static SKColor Sum(this SKColor a, SKColor b)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | a | The first color |
| SKColor | b | The second color |
Returns
| Type | Description |
|---|---|
| SKColor | The sum of the two colors |
ToRgbColor(SKColor)
Converts hte SKColor to an RGB.NET color
Declaration
public static Color ToRgbColor(this SKColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | color | The color to convert |
Returns
| Type | Description |
|---|---|
| Color | The RGB.NET color |