Change color number

hello
i want to know how to change color of texte which is a number with condition which means for example i want if the number injected < 10 should appear red