The light-dark() CSS function accepts two colors and uses one depending on the current color scheme.
light-dark()