Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Color code

Topic Labels: Base design Data
1019 2
cancel
Showing results for 
Search instead for 
Did you mean: 
erikvestlund
4 - Data Explorer
4 - Data Explorer

Hi guys,

Im new to Airtable but loving it so far. 

I just have one issue. 
- I need to get a HEX color code from a status (approved, awaiting approval and rejected, green, yellow and red) to a new field. 

How do i actually link the status to a hex color code? 

2 Replies 2

Could you provide a screenshot of your table setup and your expected output please?

Alexey_Gusev
13 - Mars
13 - Mars

Hi,
You can use one-liner in scripting extension, which give you color names (put your table and field name):
Ignore linter warning.

output.text(base.getTable('Tablename').getField('Fieldname')?.options?.choices.map(c=>c.color).join(', '))


Then, you can go to 
https://airtable.com/css/compiled/all.css
and search for --palette-neutral-black
there you can find RGB values in decimal format

 if you just need to get a few values, do a screenshot and use Color Picker in Paint
functionality 'get HEX for Color name' present in Custom Extensions:  colorUtils , 
but I think it's a hardest way to accomplish your task