Skip to main content
Participant
December 11, 2019
Question

Asset API color value to hex value

  • December 11, 2019
  • 2 replies
  • 690 views

I am writing a plugin to export the list of color Assets from XD. I am using the assets.colors.get() method to retrieve the colors and iterating to find the value of each, however, the values return in an indiscernable 8-10 digital numeric format.

 

Is there a way to convert the value returned to a hex value?

 

Below is the object returned by the get method:

 

[ { name: 'COLOR 1: TABLE BACKGROUND - COLOR 4: MODULE BACKGROUND',

    color: { value: 4294638330 } },

  { name: 'COLOR 2: TABLE BACKGROUND 2 - COLOR 5: MODULE SUB NAV',

    color: { value: 4293256677 } },

  { name: 'COLOR 3: TABLE HEADER', color: { value: 4281545523 } },

  { name: 'COLOR 6: MODULE FEATURE COLUMN',

    color: { value: 4278605191 } },

  { name: 'COLOR 7: HEADLINE TEXT', color: { value: 4294506744 } },

  { name: 'COLOR 8: REVERSED TEXT', color: { value: 4294967295 } },

  { name: 'COLOR 9: REVERSED LINK', color: { value: 4288934143 } },

  { name: 'COLOR 10: MODULAR RULE', color: { value: 4244635647 } },

  { name: 'COLOR 11: HEADLINE UNDERLINE',

    color: { value: 4293402142 } },

  { name: 'COLOR 12: SUBTEXT', color: { value: 4279323233 } },

  { name: 'COLOR 13: HEADLINE', color: { value: 4278221736 } },

  { name: 'HR: HORIZONTAL RULE', color: { value: 4231213875 } },

  { name: 'PAGE BACKGROUND COLOR', color: { value: 16053492 } },

  { name: 'TABLE HEADER TEXT COLOR',

    color: { value: 4294309365 } } ]

This topic has been closed for replies.

2 replies

Participant
July 15, 2020

Hi Adame, 


Hope you're doing well. 
I'd like to know if you have managed to solve your issue with color value to hex. 

Thank you 🙂 

Rishabh_Tiwari
Legend
July 19, 2020

Hi there,

 

Thanks for reaching out. Regarding queries developing a plugin, we have a separate forum: https://forums.adobexdplatform.com/

 

I'd request posting your query there so that experts can help you.

 

Regards

Rishabh

Preran
Legend
December 11, 2019

We have a separate forum for plugin developers https://forums.adobexdplatform.com/

 

I suggest posting your question over there.