JSFiddle - React, Tailwind, and code Playground

HTML

<!doctype html>
<html>
<head>
  <title>Getting Color Profile Colors</title>
</head>
<body>
  <p id="testParagraph">
    This is some text.
  </p>
  <p id="computedColor"></p>
</body>
</html>

CSS

#testParagraph {color: blue;}

JavaScript

let para = document.querySelector('#testParagraph');
let compStyles = window.getComputedStyle(para);
let computedColor = document.querySelector('#computedColor');
computedColor.textContent = 'My computed color is ' +
    compStyles.getPropertyValue('color');