Skip to main content

sectionColor

Type: function(section, defaultColor, extraConfig)

By default, the category color of the section will be shown, or grey if no category has been assigned.

A function that determines the section color. Must return a CSS string (e.g. 'red' or '#ccc').

The parameters that are passed to sectionColor are:

  • section: The current section.
  • defaultColor: The default section color.
  • extraConfig: Variables and data from your application. See extraConfig.
Accessing your application variables

This function is called inside the Seats.io iFrame and cannot access variables defined in the scope of your application. To do so, pass them first through the extraConfig configuration parameter.

sectionColor: function(section, defaultColor, extraConfig) {
if(section.label === 'Section 1') {
return 'red';
}
return defaultColor;
}