String Variable from Color Variable HEX code

Is there a way to keep a string variable aligned with a color variable HEX code, either through aliasing or by another method?

For example:
Color Variable
|Key | Value|
|myColorVar | #FFFFFF|

String Variable
|Key | Value|
|myStringVar | myColorVar variable|

myStringVar = “#FFFFFF

Use case: It would be nice for documentation to be able to automatically keep written HEX colour codes aligned with changes to the colour variables they are documenting.

Thanks for the help!!

Hi @Allen_Chris_CITZ_EX, Thanks for reaching out about this!

Currently, it appears that a string variable cannot reference a color variable in Figma. When creating an alias, a variable can only reference other variables of the same type.
You can find more details here: Create and manage variables - Create an alias

As a side note, this sounds like a fantastic idea for a feature request! If you’re interested, we encourage you to share this suggestion in the “Share an Idea” category.

I also took some time to search our community for any plugins that might help with this, but unfortunately, I haven’t found anything suitable yet.

Let’s hope someone from our community might have some tips or workarounds to share!
If anyone has any suggestions or insights, please feel free to jump in.

Thanks again for reaching out.

Yes, it would be a great feature to access color variables as a text string.

Hi, To ensure it gets the proper attention, I’ve moved this topic to the “Share an Idea” section. Please vote up!


Thanks @Junko3! Appreciate it. I’ll give it a vote.

I’ll work on creating a plugin for this functionality. I’ll make sure to share here once I get it rolling.

1 Like