Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Valentin Valeanu 29 posts 152 karma points
    Aug 20, 2020 @ 12:14
    Valentin Valeanu
    0

    Umbraco 8 color picker for grid layout

    Hello Umbraco,

    I am trying to add a color picker to my grid layout so I can modify the background color.

    Unfortunately, when I pick a color in the back-end, the whole object is linked as value to the front-end. Does anybody know how can I fix this? Below you can see how this looks:

    front-end

    And here is my style JSON from the grid layout:

    [{
    "label": "Baggrundsfarve",
    "key": "background-color",
    "view": "colorpicker",
    "prevalues": [
      {
        "label": "None",
        "value": "#FFFFFF"
      },
      {
        "label": "Lyse Grå",
        "value": "#EDEDED"
      },
      {
        "label": "Mørke Grå",
        "value": "#D2D2D2"
      },
      {
        "label": "Lyse Blå",
        "value": "#A8D1E2"
      },
      {
        "label": "Logo Blå",
        "value": "#637B9E"
      },
      {
        "label": "Lyse Grøn",
        "value": "#B0CE91"
      },
      {
        "label": "Orange",
        "value": "#FF9900"
      },
      {
        "label": "Gul",
        "value": "#FAE678"
      }
    ],
    "config": {
      "useLabel": true
    }}]
    
Please Sign in or register to post replies

Write your reply to:

Draft