How to set automaticaly a text color from the primary color

Please how to set automaticaly a text color from the primary color ?

example :

<span class="text-color-primary" >hello</span>

the the color will change dynamically in relation to the main color of the theme in app.js file