Table of Contents

Method FindFirstUnusedColor

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

FindFirstUnusedColor(RGBValue?)

Finds the first color that is never used in the image.

public virtual Color FindFirstUnusedColor(RGBValue? startRGB = null)

Parameters

startRGB RGBValue?

Defines the initial value of the color. If its empty, (1, 0, 0) is used.

Returns

Color

Returns false if there is no unused color left, true on success.

Remarks

The search begins at given initial color and continues by increasing R, G and B components (in this order) by 1 until an unused color is found or the color space exhausted.