Custom color binding for Tweakpane.
Use view: 'color-2'
to bind color between 0 and 1.
<script src="tweakpane.min.js"></script>
<script src="tweakpane-plugin-template.min.js"></script>
<script>
const pane = new Tweakpane.Pane();
pane.registerPlugin(TweakpaneColorsPlugin);
</script>
import {Pane} from 'tweakpane';
import * as ColorsPlugin from 'tweakpane-plugin-colors';
const pane = new Pane();
pane.registerPlugin(ColorsPlugin);
const params = {
color: {r: 0, g: 1, b: 1},
};
pane.addInput(params, 'color', {
// required
view: 'color-2',
});