adjustedForContrast Method

Create a new ColorDef that is adjusted from this ColorDef for maximum contrast against another color. The color will either be lighter or darker, depending on which has more visibility against the other color.

adjustedForContrast(other: ColorDef, alpha?: number): ColorDef

Parameter Type Description
other ColorDef the color to contrast with
alpha number optional alpha value for the adjusted color. If not supplied alpha from this color is used.

Returns - ColorDef

Defined in

Last Updated: 11 June, 2024