Method FindOrAddColor
FindOrAddColor(Color?, string?)
Finds an existing color that matches the specified value or adds a new color if no match is found.
public virtual Color? FindOrAddColor(Color? value, string? title = null)
Parameters
valueColorThe color to search for or add. Cannot be null.
titlestringAn optional title associated with the color. If provided, it may be used to label the color.
Returns
Remarks
This method attempts to locate a color that matches the specified value. If no match is found, a new color is added to the collection.