resolve as hexadecimal color (Integration function)

Attempts to convert the input value into a hexadecimal colour code. The input value can also be the name of an Lobster Data Platform / Orchestration colour variable (Styles). This function is mainly used to be able to draw colour values configured in the system (e.g. provide tracking status colour via residual service).

Parameter

Parameter

Meaning

a

The value to be converted into a hexadecimal colour code.
The following formats are supported:

  • Integer (32 bit colour value as integer) e.g. '9965381'.

  • Integer as text (32 bit colour value in text form) e.g. '9965381'.

  • Hexadecimal e.g. '980F45', '#980F45', '0x980F45'.

  • CSS rgb format e.g. 'rgb(152,15,69)', 'rgba(152,15,69,255)'.

  • Name of a Styles colour variable (e.g. 'primaryColor' → See parameter b)

b

Name of the Styles to use to resolve colour variables.
If b is not given, the default style is accessed first (name 'default', 'pro' or 'scm').
If no default style is available, the delivery default is used.

Return value

Returns the hexadecimal color value with leading '#' character or zero if no conversion could be done.

Examples

Input a

Output

9965381

#980F45

#980F45

#980F45

primaryColor

#980F45