Skip to main content

IColorOperations interface

📖 Description​

Describes the operations interface for the color function.

📃 Type declaration​

interface IColorOperations {
  manipulate: (manipulation: (color: Color) => Color, condition?: boolean) => IColorOperations;Function
  makeBlackOrWhite: (condition?: boolean) => IColorOperations;Function
  makeUnclear: (color: string) => IColorOperations;Function
}
🖱ī¸ Hover with the mouse over a property name for a tooltip with the description of that property. Click it for more information.

â–ļī¸ Functions​


🔧 makeBlackOrWhite​

Evaluates the color and makes it black or white.

Signature​

(condition?: boolean) => IColorOperations

Parameters​

NameTypeOptionalDescription
conditionbooleanYesSpecifies an optional condition. When this argument is false, the operation is not applied.

Return value​

Returns a reference to the IColorOperations object.


🔧 makeUnclear​

Specifies a color in case the color is transparent.

Signature​

(color: string) => IColorOperations

Parameters​

NameTypeOptionalDescription
colorstringNoSpecifies the color to use.

Return value​

Returns a reference to the IColorOperations object.


🔧 manipulate​

Manipulate a color.

Signature​

(manipulation: (color: Color) => Color, condition?: boolean) => IColorOperations

Parameters​

NameTypeOptionalDescription
manipulation(color: Color) => ColorNoSpecifies the color manipulation function.
conditionbooleanYesSpecifies an optional condition. When this argument is false, the manipulation is not applied.

Return value​

Returns a reference to the IColorOperations object.