on

abstract infix fun on(bg: TextStyle): TextStyle

Create a style with the foreground color of bg as the background color of the new style.

All other attributes will be copied from this style.

Example

(red on blue) == TextStyle(color=red, bgColor=blue)

val style1 = TextStyle(red, bold=true)
val style2 = TextStyle(blue, italic=true)
(style1 on style2) == TextStyle(red, blue, bold=true)