Is there a way to set the gutenberg color palette outside the theme?

Yes, you have to use the init hook if you want to use add_theme_support from a plugin. I’ve tested the below code as a plugin and worked for me.

<?php

/* Plugin name: Add Color Palette
*/
function mytheme_setup_theme_supported_features()
{
    add_theme_support('editor-color-palette', array(
        array(
            'name' => esc_attr__('Strong magenta', 'themeLangDomain'),
            'slug' => 'strong-magenta',
            'color' => '#a156b4',
        ),
    ));
}

add_action('init', 'mytheme_setup_theme_supported_features');

Please consider avoiding using add_theme_support outside the theme’s functions.php file.

The official description for the add_theme_support :

Must be called in the theme’s functions.php file to work. If attached
to a hook, it must be ‘after_setup_theme’. The ‘init’ hook may be too
late for some features.

https://developer.wordpress.org/reference/functions/add_theme_support/