With YITH WooCommerce Color and Label Variations, you can show all your product variations such as colors, sizes, shapes, etc. as selectable color swatches, labels or even with custom images. The customer will be able to pick their favorite variation right from the Shop page and other archive pages. The plugin also allows splitting variations of the same product and show them as separate items on the Shop and archive pages.
The combined use of these two plugins allows users to choose the variation of the products directly from the modal window.
To do it, you need to install activate both plugins on your e-commerce site (both premium version).
For further details about YITH WooCommerce Color and Label Variations settings, please refer to the official documentation.