I use in a List View inside of a Split View. On the iPad and in Mac Catalyst, the items are displayed with different background colors (blue, gray) when selected. A Text View automatically adjusts the text color. But if I want to use other views or modify the text color in a search, I need the text color and/or the background color of the item. If you use a UITableViewCell in UIKit, this query is simple. For an app in SwiftUI I haven't found a solution yet.
Does anyone have an idea how to determine the text color and/or background color?

