mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-13 09:08:34 +00:00
Updated Color Corrections (markdown)
parent
67a1be36fc
commit
3c1713502c
@ -1 +1,19 @@
|
|||||||
TODO
|
Color-Corrections are meant to modify a color in a fixed, predefined way.
|
||||||
|
|
||||||
|
A good example and the only predefined Color-Correction in CUE.NET is the [gamma correction](https://en.wikipedia.org/wiki/Gamma_correction) (often configurable in games).
|
||||||
|
Applying a color-correction to a brush is straight forward and might look like this:
|
||||||
|
```C#
|
||||||
|
IColorCorrection gammaCorrection = new GammaCorrection(2);
|
||||||
|
myBrush.ColorCorrections.Add(gammaCorrection);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Implementing an own color-correction
|
||||||
|
To implement your own color-correction you just need to implement the _IColorCorrection_-interface which contains only the _ApplyTo_-method.
|
||||||
|
```C#
|
||||||
|
public interface IColorCorrection
|
||||||
|
{
|
||||||
|
void ApplyTo(CorsairColor color);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
The _ApplyTo_-method contains all the logic to modify the color given as a parameter.
|
||||||
|
You can look at the [gamma-correction](https://github.com/DarthAffe/CUE.NET/blob/master/ColorCorrection/GammaCorrection.cs#L81) for a reference on how this might look.
|
||||||
Loading…
x
Reference in New Issue
Block a user