Custom colors in color picker?

Last post 06-14-2007, 8:03 AM by Anonymous. 4 replies.
Sort Posts: Previous Next
  •  06-13-2007, 3:02 PM 30690

    Custom colors in color picker?

    Hi,
     
    Is it possible to define a set of custom colors for the color picker?
     
    Many Thanks,
    Ady
  •  06-13-2007, 3:10 PM 30691 in reply to 30690

    Re: Custom colors in color picker?

    Ady,
     
    Please open CuteSoft_Client\CuteEditor\Scripts\ColorPicker.htc file and modify the following code:
     
    // All colors in the following color array will be used in the editor color picker
    var colorsArray = new Array("#000000","#993300","#333300","#003300","#003366","#000080","#333399","#333333",
       "#800000","#FF6600","#808000","#008000","#008080","#0000FF","#666699","#808080",
       "#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#999999",
       "#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#C0C0C0",
       "#FF99CC","#FFCC99","#FFFF99","#CCFFCC","#CCFFFF","#99CCFF","#CC99FF","#FFFFFF");

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-13-2007, 3:14 PM 30694 in reply to 30691

    Re: Custom colors in color picker?

    Wicked,
    Thanks Adam
  •  06-14-2007, 4:08 AM 30711 in reply to 30691

    Re: Custom colors in color picker?

    Hi Adam,
     
    Looks like the colour picker is only supported by Internet Explorer, when using FireFox it goes straight to the advanced options page, and doesn't list the custom colours there.
     
    Is it possible to at least change the default colour (at present it is "red").
     
    Thanks,
    Ady
  •  06-14-2007, 8:03 AM 30722 in reply to 30711

    Re: Custom colors in color picker?

    Well,
     
    For the sake of anyone who might stumble upon this problem in the future:
     
    Edit the following file:
    CuteSoft_Client\CuteEditor\Dialogs\colorpicker.aspx
     
    Use code similar to the following:
     
    <br />
    <style type="text/css">
      .ph_picker a   {float:left;width:11px;height:11px;font-size:0em;border:1px solid black;margin:2px;display:block;}
      .ph_picker div {float:left;height:11px;vertical-align:middle;}
    </style>

    <table width="100%">
      <tr>
        <td class="ph_picker">
          <div>Custom Colours:</div>
          <a href="#" title="#ce0815" onclick="document.getElementById('val_v').value = '#ce0815';return false;" style="background-color:#ce0815;"><br /></a>
          <a href="#" title="#444444" onclick="document.getElementById('val_v').value = '#444444';return false;" style="background-color:#444444;"><br /></a>
          <a href="#" title="#aaaaaa" onclick="document.getElementById('val_v').value = '#aaaaaa';return false;" style="background-color:#aaaaaa;"><br /></a>
        </td>
      </tr>
    </table>
View as RSS news feed in XML