withColor

infix fun <C : BuildableComponent<C, B>, B : ComponentBuilder<C, B>> ComponentBuilder<C, B>.withColor(color: TextColor): @NotNull B

Sets the color of this component builder.

Return

The component builder with the applied color

Parameters

color

The text color to apply


infix fun Style.withColor(color: TextColor): @NotNull Style

Sets the color of this style.

Return

The style with the applied color

Parameters

color

The text color to apply


infix fun Style.withColor(color: Int): @NotNull Style

Sets the color of this style using an integer RGB value.

Return

The style with the applied color

Parameters

color

The RGB color value


infix fun ComponentBuilder.withColor(color: TextColor): ComponentBuilder

Sets the color of the last component added to this ComponentBuilder.


Sets the color of the last component added to this ComponentBuilder using an integer RGB value.