Parse color code
Description
This operation converts a color code in a supported format to other standard color formats.
This operation accepts a color code as input and automatically detects the format. It then returns the equivalent color in the chosen format. If the input format is invalid or cannot be parsed, the operation returns all fields as empty strings instead of an error.
Supported formats
These are the supported formats for your input strings, as well as the formats you can convert them into:
HEX
#ff0000
, ff0000
RGB
rgb(255, 0, 0)
RGBA
rgba(255, 0, 0, 1)
HSL
hsl(0, 100%, 50%)
HSLA
hsla(0, 100%, 50%, 1)
CMYK
cmyk(0.00, 1.00, 1.00, 0.00)
Data types
These are the input/output expected data types for this operation:
Input data
- Strings representing the color codes you want to transform.
Output data
- The resulting color codes transformed into multiple formats.
Parameters
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Example
Suppose you want to transform your input color codes into a different format:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Parse color code.
Set Format color to
RGB
.Give your Output field a name and click Save. The input color codes will be transformed into the chosen format.
For example:
"#ff0000" -> "rgb(255, 0, 0)"
Last updated
Was this helpful?