code: private function implode(array $config): string
      {
          $palette = '';
  
          foreach ($config as $legend => $group) {
              if (\count($group['fields']) < 1) {
                  continue;
              }
  
              if ('' !== $palette) {
                  $palette .= ';';
              }
  
              if (!\is_int($legend)) {
                  $palette .= sprintf('{%s%s},', $legend, ($group['hide'] ? ':hide' : ''));
              }
  
              $palette .= implode(',', $group['fields']);
          }
  
          return $palette;
      }
docs: Converts a configuration array to a palette string.