API Reference > imodeljs-common > Symbology > ColorDef > adjustForContrast 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. Returns - ColorDef Defined in core/common/src/ColorDef.ts Line 607 Last Updated: 13 June, 2024