isBrightColor
Returns true if the pseudo-brightness of the specified color is greater than 55%.
static
static isBrightColor(color: UIColor | string): boolean
Notes
- This method is used by the UIColor.text() method to determine a suitable text color.
Parameters
- color — A color value, in hex format
#112233
or#123
, or rgb(a) formatrgb(255, 255, 255)
Return value
True if the specified color has a relatively high perceived brightness.
Related
- class UIColorAn object that represents a single color value.