• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Asset API color value to hex value

New Here ,
Dec 11, 2019 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 } } ]

Views

458

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
community guidelines
Adobe Employee ,
Dec 11, 2019 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.

Votes

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
community guidelines
New Here ,
Jul 15, 2020 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 🙂 

Votes

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
community guidelines
Adobe Employee ,
Jul 19, 2020 Jul 19, 2020

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines