Skip to main content

TextColor

Overrides the default text color (black) inherited by descendent components with text.

modifier TextColor

Example

import { TextColor, Text, VStack } from ui

export var main = VStack {
Text("Default")

VStack {
Text("Overriden")
Text("Overriden")
} with {
TextColor(Color(0xFFAA7799))
}
}

TextColor Example

Constructor

constructor(_ color: Color?)
_ color: Color?

An optional color. To let text inherit the default text color defined above this modifier provide nil.