How to get the element Text Color in JavaScript

Use style.color on the element you want to check.

document.getElementById("yourElementId").style.color;

Example:

<span id="hello" style="color: red">Hello</span>

<script>
    var elementColor = document.getElementById("hello").style.color; 
    console.log(elementColor)
</script>

Output (console): red