Back to Plugins
TextColor2Android

TextColor2Android

Transform Figma TextNode Colors to XML and Kotlin Seamlessly

androidtextnodexmlkotlincolorcompose

Plugin Preview

TextColor2Android preview

About this plugin

该插件支持将 Figma TextNode 的颜色导出成 Android 的 colors.xml 和 Compose 的 Color.kt 格式


How to use

  1. 打开插件
  2. 选中所有你需要导出的 TextNode 节点
  3. 选择导出成 Xml or Compose 格式
  4. Copy to Clipboard


导出成 Xml 的示例

<color name="textNode1">FFFFFFFF</color>
<color name="textNode2">FF000000</color>
<color name="textNode3">40000000</color>
<color name="textNode4">D9000000</color>
<color name="textNode5">D9000000</color>


导出成 Compose Colors.kt 的示例

val textNode1 = Color(0xFFFFFFFF)
val textNode2 = Color(0xFF000000)
val textNode3 = Color(0x40000000)
val textNode4 = Color(0xD9000000)
val textNode5 = Color(0xD9000000)


Github 链接

https://github.com/sunnyswag/Color2Android


---------------------------------------------------------------------


This plugin supports exporting the color of Figma TextNodes into Android's colors.xml and Compose's Color.kt formats.


How to use

  1. Open the plugin
  2. Select all the TextNode elements you need to export
  3. Choose to export as Xml or Compose format
  4. Copy to Clipboard


Example of export to Xml

<color name="textNode1">FFFFFFFF</color>
<color name="textNode2">FF000000</color>
<color name="textNode3">40000000</color>
<color name="textNode4">D9000000</color>
<color name="textNode5">D9000000</color>


Example of export to Compose Colors.kt

val textNode1 = Color(0xFFFFFFFF)
val textNode2 = Color(0xFF000000)
val textNode3 = Color(0x40000000)
val textNode4 = Color(0xD9000000)
val textNode5 = Color(0xD9000000)


Github link

https://github.com/sunnyswag/Color2Android

Plugin Details

Version3
CreatedSeptember 23, 2023
Last UpdatedJune 25, 2024
CategorySoftware development
Creatorhuiqing Huang
Stats14 installs, 1 likes
PricingFree

Technical Details

  • API:1.0.0
  • UI:app/plugin/dist/index.html
  • main:app/plugin/dist/code.js
  • Document Access:dynamic-page
  • Editor Types:
    figma
  • Allowed Domains:
    • none