Color To String
Last updated
Last updated
Converts a color object into a text representation in a specified format. This is useful when you need to output colors as hex codes, CSS color functions, or other text-based formats.
color
The color to convert to text
Color
No
space
The format to output (hex, rgb, hsl, etc.)
String
No
value
The color as a text string
String
Drag the Color to String node into your graph.
Drag the Input node and set the input type to "color". Set the input color (e.g. #2669F4)
Connect the output to the "color" input.
Choose an output format from the "space" dropdown (e.g., "hsl" for "hsl(225,0,0) format).
Run the graph—your output will be a text string like "#2669F4" or "hsl(220.49 90.351% 55.294%)".
The "hex" format is most common for web development and design tools.
Other formats like "rgb" or "hsl" provide more readable information about the color's components.
CSS Output: Generate color strings for use in CSS stylesheets or style objects.
Design Token Export: Convert colors to string format for export to design token files.
Color Communication: Create readable text versions of colors for documentation or sharing.
: For converting text color representations back into color objects.
: For breaking a color into its individual component values.