'How to set an icon's color to [default color] in jetpack compose?

An icon has a default color, and it could be different under different themes.

When meet the condition, I hope the icon's color become Color.RED, otherwise it used the default color (example, white on one theme and yellow on another theme)

But I don't know the grammar of how to set to default color. Please help, thanks a lot!

val judge = ... //a mutableStateOf Boolean
...
// how to set [default color]?
Icon(painterResource(R.drawable.ic_baseline_error_outline_24), 
    contentDescription = null, 
    tint = if (judge) Color.RED else [default color])


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source