Hello,
I have been attempting to retreive the hex colour code of a jPanel's background colour, so far I have the code
Integer.toHexString(jPanelgetBackground().getRGB()));
However this is returning an 8 digit string (for example. if the jpanels background color is white, this will return ffffffff instead of a the six digit value ffffff that I want. If I try black 000000 my code returns ff000000.
I am trying to retreive the colour and then use it in a CSS file. However every time there is an extra ff added to the start of the string. Where am I going wrong?