Table of Contents

Method LighterOrDarker

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

LighterOrDarker(float)

Adjusts the brightness of the color by a specified percentage.

public Color LighterOrDarker(float percOfLight)

Parameters

percOfLight float

A percentage value indicating the amount of brightness adjustment. Positive values make the color lighter, while negative values make it darker.

Returns

Color

A new Color instance that is lighter or darker based on the specified percentage. If percOfLight is zero, the original color is returned.