- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Apr 07, 2024 05:36 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Apr 07, 2024 07:23 PM
Could you provide a screenshot of your table setup and your expected output please?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Apr 08, 2024 05:36 PM
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
