Hi, i´m using the color picker described in http://www.couchcms.com/forum/viewtopic.php?f=8&t=7124&p=13655&hilit=color#p13655 which returns a hex value, there is one case in that i need the value in rgba format. Following the method described in the i was trying the method described in the http://jscolor.com/try.php#getting-color and came up with this code winch didn't work:
Code: Select all
<cms:editable name="primary_color" type="text" />
<cms:editable name="red" type="text" />
<cms:editable name="green" type="text" />
<cms:editable name="blue" type="text" />

<cms:editable name="primary_color_picker" type="message" >
    <script type="text/javascript" src="<cms:show k_site_link/>admin/addons/jscolor/jscolor.js"></script>
    <script type="text/javascript">
        new jscolor.color(document.getElementById('f_primary_color'), {});
        new jscolor.color(document.getElementById('f_red').value = this.color.rgb[0]*100 + '%';);
        new jscolor.color(document.getElementById('f_green').value = this.color.rgb[0]*100 + '%';));
        new jscolor.color(document.getElementById('f_blue').value = this.color.rgb[0]*100 + '%';));

Is there any way to achieve this? either by the way described above (in which i know i must have declared something wrong) or with the <cms:php> tag which i tried too with some php tutorials but didn't work neither