OudsColoredBox

fun OudsColoredBox(color: OudsColoredBoxColor, modifier: Modifier = Modifier, contentAlignment: Alignment = Alignment.TopStart, propagateMinConstraints: Boolean = false, content: @Composable BoxScope.() -> Unit)

Colored box is a Box where the content color is automatically adjusted to maximize the contrast with the chosen background color.

Additionally, the colors of several OUDS Android components (such as OudsButton or OudsLink) are also automatically adjusted. Some tokens associated with these specific colors can be customized and are grouped into Mono token classes (e.g., com.orange.ouds.theme.tokens.components.OudsButtonMonoTokens).

Parameters

color

The background color of the colored box.

modifier

Modifier to be applied to the colored box.

contentAlignment

The default Alignment inside the colored box.

propagateMinConstraints

Whether the incoming min constraints should be passed to content.

content

The content of this colored box.

Samples

OudsColoredBox(color = OudsColoredBoxColor.StatusInfoEmphasized) {
    // From this point the theme is automatically adjusted to maximize the contrast with OudsColoredBoxColor.StatusInfoEmphasized
    Text("Text")
}