Class LedEffect
Controller LED color for a duration. Hardware-agnostic: drives any controllable controller LED
(PlayStation light bar on DualSense / DualShock 4, Switch Pro home-ring intensity, ...). RGBA are
0..1 floats (engine-agnostic); A doubles as a brightness multiplier so global intensity can dim the
LED without changing its hue.
Assembly: Serenity.Feedback.Application.dll
Syntax
public sealed class LedEffect : IFeedbackEffect
Constructors
LedEffect(float, float, float, float, float, bool)
Initializes a new instance.
Declaration
public LedEffect(float r, float g, float b, float a, float durationSeconds, bool haveExitTime = true)
Parameters
Fields
A
Declaration
Field Value
| Type |
Description |
| float |
Brightness/alpha (0..1). Scaled by global intensity.
|
B
Declaration
Field Value
DurationSeconds
Declaration
public readonly float DurationSeconds
Field Value
G
Declaration
Field Value
HaveExitTime
Declaration
public readonly bool HaveExitTime
Field Value
| Type |
Description |
| bool |
When true the channel auto-resets the color after its duration; when false the color
persists until another effect overwrites it (e.g. a black LED effect).
|
Kind
Declaration
public const string Kind = "led"
Field Value
| Type |
Description |
| string |
Stable kind id for this effect.
|
R
Declaration
Field Value
Properties
BypassesGlobalGate
Declaration
public bool BypassesGlobalGate { get; }
Property Value
| Type |
Description |
| bool |
When true, this effect ignores the global vibration enable/intensity settings — it is
dispatched even when feedback is disabled and is never passed through Scaled(float).
Reserved for non-haptic effects (e.g. audio) that must not be silenced or attenuated by the
controller-vibration toggle. Haptic effects return false.
|
EffectKind
Declaration
public string EffectKind { get; }
Property Value
| Type |
Description |
| string |
Stable identifier of the effect type (e.g. "vibration"). Used for logging/diagnostics.
|
Methods
Scaled(float)
Returns a copy of this effect scaled by the global intensity multiplier (0..1).
Declaration
public IFeedbackEffect Scaled(float globalIntensity)
Parameters
| Type |
Name |
Description |
| float |
globalIntensity |
Global multiplier; values outside 0..1 are clamped by the effect.
|
Returns
Implements