public function parse(array $palettes, array $subPalettes = [], PaletteCollectionInterface $collection = null)
    {
        if (isset($palettes['__selector__'])) {
            $selectorFieldNames = $palettes['__selector__'];
            unset($palettes['__selector__']);
        } else {
            $selectorFieldNames = [];
        }

        return $this->parsePalettes(
            $palettes,
            $this->parseSubpalettes($subPalettes, $selectorFieldNames),
            $selectorFieldNames,
            $collection
        );
    }