Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

extracting pen colours in hex

Hi

I want to take the colour from a range in custom chart and use it to set the backgroundColor of a cell in an HTML table.

I tried

var graph=document.appGraph.getChartObject()

tab1.rows[1].cells[1].style.backgroundColor = graph.getPenColor(1)

but it doesn't work, because the getPenColor returns the following

java.awt.Color[r=255,g=0,b=0]

how do I either return a hex colour code, or convert this to a hex code?

Thanks

Nick

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question