No announcement yet.

Html color

  • Filter
  • Time
  • Show
Clear All
new posts

  • Html color

    What should be the proper database type for HTML COLOR field type in SC ?
    I also would like to have a drop-down (Select) list to be able to select and assign certain colors from the list to the record. What's the best approach ?
    Last edited by aka; 01-24-2015, 02:59 AM.

  • #2
    Html color is 7chars. # plus 3hex paird, for Red Green Blue
    A char of 7 length is enough.

    About a drop down you will have to code colors and html codes manually (or store on a table) for Database manually, but with CSS you can get a pretty drop down color selector. I will try to give time tomorrow and do some testa

    Professional Scriptcase Services
    Some Customers opinions


    • #3
      some example would be appreciated. I'm lazy and do not like to code ;-) so any simple / similar solution is fine. The main idea is to be able to display a little square icon with the color based on the record content or based on what user selects on the record edit form. That is the reason I need eventually a dropdown list with list or a lookup table to allow the selection.
      I know I can create a dropdown with keywords like: GREEN, YELLOW, RED etc, but it would be much nicer to see a colors instead keywords. Since there will be not many colors (I guess up to 16) then Radio button might work as well. The only question is how to replace the button names with color icons. This is pretty common situation when one needs to pick a selection based on some picture.