2 using System.Collections.Generic;
26 get {
return _ActiveColor1; }
27 set { _ActiveColor1 = value; }
41 get {
return _ActiveColor2; }
42 set { _ActiveColor2 = value; }
56 get {
return _InactiveColor; }
57 set { _InactiveColor = value; }
64 double BlendVal = (Math.Sin(Value * Math.PI * 2 + Time) + 1) / 2;
66 (
int)(BlendVal * ActiveColor1.Red + (1 - BlendVal) * ActiveColor2.Red),
67 (
int)(BlendVal * ActiveColor1.Green + (1 - BlendVal) * ActiveColor2.Green),
68 (
int)(BlendVal * ActiveColor1.Blue + (1 - BlendVal) * ActiveColor2.Blue),
69 (
int)((BlendVal * ActiveColor1.Alpha + (1 - BlendVal) * ActiveColor2.Alpha) * Value)
75 int V = TriggerValue.Limit(0, 255);
76 D.
Red = InactiveColor.Red + (int)((
float)(Blended.
Red - InactiveColor.Red) * V / 255).Limit(0, 255);
77 D.
Green = InactiveColor.Green + (int)((
float)(Blended.
Green - InactiveColor.Green) * V / 255).Limit(0, 255);
78 D.
Blue = InactiveColor.Blue + (int)((
float)(Blended.
Blue - InactiveColor.Blue) * V / 255).Limit(0, 255);
79 D.
Alpha = InactiveColor.Alpha + (int)((
float)(Blended.
Alpha - InactiveColor.Alpha) * V / 255).Limit(0, 255);
This class stores information on colors used for toys and effects (e.g. RGBLed).
int Red
Brightness for Red.
Displayes a classical plasma effect on a RGBA matrix/ledstrip array. For more details on the math of ...
int Green
Brightness for Green.
int Blue
Brightness for Blue.
int Alpha
Alpha value for the color.
The namespace DirectOutput.General contains classes for general use.
override RGBAColor GetEffectValue(int TriggerValue, double Time, double Value, double X, double Y)