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
- core/common/src/ColorDef.ts Line 618
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.