Highlighted

Asset API color value to hex value

New Here ,
Dec 11, 2019

Copy link to clipboard

Copied

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 } } ]

TOPICS
Code, Other

Views

294

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Asset API color value to hex value

New Here ,
Dec 11, 2019

Copy link to clipboard

Copied

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 } } ]

TOPICS
Code, Other

Views

295

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 11, 2019 0
Adobe Employee ,
Dec 11, 2019

Copy link to clipboard

Copied

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

 

I suggest posting your question over there.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2019 1
New Here ,
Jul 15, 2020

Copy link to clipboard

Copied

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 🙂 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2020 0
Adobe Employee ,
Jul 19, 2020

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 19, 2020 1