Ultimately, the problem with getComputedStyle is that it seems that this element should be part of the DOMTree for any style to be available.
Please note that in my case, I added the div to the parent container, however, the parent container was not yet added to the DOMTree when the instance was created.
My failure to use JSON.stringify() to print the object meant that the values โโappeared later but were empty during access.
Basically, I temporarily changed my container.appendChild to document.body.appendChild in order to calculate the style I need, and then delete it and destroy it, leaving me only the colors I need.
Clark source share