Forum Discussion
I used:
var style = page.contentDocument.defaultView.currentStyle.backgroundColor(colorPrimary, "")
as you suggested.
I am getting:
TypeError: Cannot read property 'backgroundColor' of undefined
backgroundColor is not a method, it's the actual property. So, just compare that property to the desired value.
- royd7 years agoRegular Contributor
Hi Robert
Sorry for delayed response. It took me a while but finally figured it out. Thanks for pointing me to right direction. This is what finally worked:
var previewColor = previewSwatch.ownerDocument.defaultView.getComputedStyle(previewSwatch, "").backgroundColor;
- TanyaYatskovska7 years ago
Alumni
- Bhagavathi6 years agoVisitor
color_value=Aliases.browser.page.{object_name}.getAttribute('fill')
Log.Message(color_value)
color_value has "#e1542b", I have to convert hexcode to rgb inorder to verify rgb color value, as have a color file where I stored the list of colour name according to rgb values.
Kindly help on this.
- royd7 years agoRegular Contributor
Hi Robert
Thank you for the clarification. :)
- TanyaYatskovska7 years ago
Alumni
Hi royd,
Could you please mark the answer that help you as a solution? You see a big green "Accept as Solution" button next to it. It will help other community members who will face a similar situation. Thanks.
- royd7 years agoRegular Contributor
Hi Tanya
I always do, when I have found a solution!
I would like to take the opportunity to point out, that the users are always there to help, more than support people. Especially Robert has always been there and help solve 95% of my problems!! I can not thank him and all other experts that have helped me.