This is a brief lesson on color temperature.
As a reminder, color temperature is how warm or cool a color appears. For example, red appears warm next to blue. Orange appears warm next to purple. But that's a deceptively simple explanation. Effective application of color temperature is much more nuanced.
A great exercise to help you understand color temperature is to paint white sand that is partly in light and partly in shadow. The object (white sand) stays the same, but the colors change dramatically. Under the midday sun, the shadows will be all kinds of cool blues and purples. The lights will be warm, shimmering yellows and oranges.
A common mistake would be to use light yellow for the lights and dark yellow for the shadows. But this ignores color temperature. The end result would be flat and lifeless.
Below is a recent example, Gold Coast, Sea and Sand. This painting is all about the temperature contrast between the warm lights and cool shadows.
I collated a handful of reference photos for you to experiment with (click to enlarge). Use them to explore the relationships between warm and cool colors. Consider doing small color studies so you can rapidly explore different color combinations.
Once you understand how color temperature works with white sand, you can move on to more sophisticated applications. Like the subtle color temperature transitions in a portrait. Lilla Perry's Lady With a Bowl of Violets comes to mind. Steve Huston's work is also worth checking out.