protected function parsePalettes(ContainerInterface $container)
    {
        $palettesDca = $this->getFromDca('palettes');

        // Skip while there is no extended palette definition.
        if (!\is_callable($palettesDca)) {
            return;
        }

        if ($container->hasDefinition(PalettesDefinitionInterface::NAME)) {
            $palettesDefinition = $container->getDefinition(PalettesDefinitionInterface::NAME);
        } else {
            $palettesDefinition = new DefaultPalettesDefinition();
            $container->setDefinition(PalettesDefinitionInterface::NAME, $palettesDefinition);
        }

        $palettesDca($palettesDefinition, $container);
    }