adjustForContrast 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.

adjustForContrast(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.

Defined in

Last Updated: 08 January, 2020