contrast
Returns a new UIColor instance with increased (or decreased) contrast compared to 50% grey.
contrast(d: number): UIColor
Parameters
- d — The change in contrast to apply, -0.5 to 0.5: positive values make light colors lighter and dark colors darker (away from mid-grey), negative values make light colors darker and dark colors lighter (towards mid-grey)
Return value
A new instance of UIColor.
Example
// Modifying a theme color
ui.separator({ color: ui.color.PRIMARY.contrast(-0.2) })
Related
- class UIColorAn object that represents a single color value.