Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8385009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:33:33+00:00 2026-06-09T17:33:33+00:00

I am working in jQuery Color Picker. I am having a constant data in

  • 0

I am working in jQuery Color Picker. I am having a constant data in my web.config file.

<add key="colorCode" value="8A2BE2,0000FF,A52A2A,D87093,00FFFF,FFE4C4,008080,FF00FF,B8860B,FF8C00,800080,DA70D6,40E0D0"/>

I my aspx page, i am having the method like

 var colorCode = '<%=ConfigurationManager.AppSettings["colorCode"]%>';
 $(function () {
 $('#color3').colorPicker({ pickerDefault: "ffffff", colors: [colorCode], transparency: true });
 });

The color picker is not recognising the colors which i had given in the web config file. How to fix this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:33:35+00:00Added an answer on June 9, 2026 at 5:33 pm

    I think your problem is that you are passing the values like:

    ["000, 000, fff, fff"];
    

    and you need

    ['000', '000', 'fff', 'fff'];
    

    as showed here.

    Try adding the '' in the config, or using split

    "000, 000, fff, fff".split(","); //["000", " 000", " fff", " fff"]
    

    In your code, the options look like this:

    1

    Config

     <add key="colorCode" value="8A2BE2,0000FF,A52A2A,D87093,00FFFF,FFE4C4,008080,FF00FF,B8860B,FF8C00,800080,DA70D6,40E0D0"/>
    

    Code

    var colorCode = '<%=ConfigurationManager.AppSettings["colorCode"]%>';
     $(function () {
          $('#color3').colorPicker({ 
                 pickerDefault: "ffffff", 
                 colors: colorCode.split(","), 
                 transparency: true 
          });
     });
    

    2

    Config

     <add key="colorCode" value="'8A2BE2','0000FF','A52A2A','D87093','00FFFF','FFE4C4','008080','FF00FF','B8860B','FF8C00','800080','DA70D6','40E0D0'"/>
    

    Code

    var colorCode = [<%=ConfigurationManager.AppSettings["colorCode"]%>];
     $(function () {
          $('#color3').colorPicker({ 
                 pickerDefault: "ffffff", 
                 colors: colorCode, 
                 transparency: true 
          });
     });
    

    If neither of them work, try removing the ' ' in the 1 example, when getting the value from the config

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a codecademy.com lesson that uses jQuery to create a color picker,
Still working through JQuery to get data and repopulate portions of a page. Right
In the jQuery file itself: this.item_test = function(){ $('body').css('background-color', '#00ff00'); window.location = /allCorrect/yes; }
i am using jquery for set background color to the table data and its
Working with Javascript (jQuery), given 2 color values ( 2033ff and 3300a0 for example)
I use two jQuery plugins on new project of mine: $(input[type=text].color).miniColors(); $(input[type=file], input[type=radio], input[type=checkbox],
I am working with a jquery dynamic flip book. I can add post it
I'm working with the jQuery ColorPicker widget - specifically exercising the ColorPickerSetColor function (just
For a jQuery colorpicker I've been working on (https://github.com/vanderlee/colorpicker), I've been asked to implement
I have added some animation using jquery but it's not working: $('.test-container').click(function(){ $(this).css('background-color', 'rgb(119,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.