contrast()
Returns a new UIColor with adjusted contrast relative to mid-grey.
contrast(d: number, threshold?: number): UIColor;
Notes
- Positive values move light colors toward white and dark colors toward black.
- Negative values move colors toward mid-grey.
Parameters
- d — The contrast adjustment, from -0.5 to 0.5.
- threshold — The brightness threshold for determining light vs dark; defaults to 0.65.
Return value
A new UIColor instance.
Related
class UIColor
A class that represents a single color value.
