I can easily check what CSS style an element has if it was applied inline:
<p style="color: red;">This is red</p>
The JS to read that color:
document.querySelector('p').style.color == 'red'
How can I check the CSS style of an element if that style was applied from an internal or external stylesheet?