Docs (4.0.0)
class UIColor method

fg

Returns a new UIColor instance for a suitable foreground color based on the current color.

fg(colorOnLight: UIColor | string, colorOnDark: UIColor | string): UIColor

Notes

  • This method first determines if the current color is bright or dark, and then returns the corresponding color from the provided parameters.

Return value

A new instance of UIColor.

Related