Forum Discussion

powerkriya's avatar
powerkriya
Frequent Visitor
6 years ago
Solved

Assigning default Color to formatting pane color field

I started with the circle card master visual project, and adding stuffs to that. I have a default color to the circle as "gold" and I want to set this default value to the circle color setting on th...
  • dm-p's avatar
    6 years ago

    Hi powerkriya,

    You need to set defaults using HTML (HEX) codes - CSS named colours don't work. So, if I change the variable assignement in your settings.ts for circleColor to the HEX value for Gold, e.g.:

    export class CircleSettings {
      public circleColor: string = "#D9B300";
      /** Rest of your properties... */
    }

    This will then work based on your current binding in visual.ts (which is correct 🙂 ), e.g.:

    (it's not easy to see but I'm clicking 'Revert to Default' in the bottom of the palette to confirm your colour defaults back to gold)

    Hopefully that's all you need to crack on - good luck!

    Daniel