8 – Problem with color module preview

I have some problems to integrate the color module in my custom D8 theme.

I can create a custom set of color palettes that can be customized in the configuration screen.

I can modify the design of the preview html file to imitate my site.

What I can not do is make the js files – preview.es6.js Y preview.js Do nothing. Like, for example, take the values ​​of my custom palette to fill in the preview.

I tried to attach the js files the way the Bartik theme does:

color.preview:
version: version
css:
topic:
color / preview.css: {}
js
color / preview.js: {}
dependencies
- color / drupal.color

This seems to do nothing and modify the preview does nothing. There is a note and a link to a previous problem that indicates preview.js that should no longer be used in favor of preview.es6.js but modifying that file, or attaching it instead of preview.js It also seems to do nothing.

Leaving aside the question of why Bartik is attaching a depreciated js file to his subject, how can I modify the js code that comes out of my preview of the color module?

If I were to pass an expert on color modules, I would also love to know why this module assigns colors to hexadecimal colors only, would not it have made more sense to assign something like scss variables named to individual colors so you can create a more flexible set? of colors? color palettes?