web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Apply different backgr...
Copilot Studio
Unanswered

Apply different background color to adaptive card container

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I have created an Adaptive Card using Bot Framework Composter to display in Power Virtual Agent Chatbot. And I am using container to display TextBlock. I want to change the background color of container but there are only 6 style options i.e., Default, Emphasis, Accent, Good, Attention and Warning. How can I apply different background color for container.

Can you please help me?

 

Thank you

I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @PowerUser14,

     

    Maybe you could use the backgroundImage property of a container as a workaround. Just use an image of a single colour:

    https://adaptivecards.io/explorer/Container.html

     

     

    {
     "type": "AdaptiveCard",
     "body": [
     {
     "type": "Container",
     "minHeight": "150px",
     "backgroundImage": "https://adaptivecards.io/content/AlkiBeach.jpg",
     "items": [
     {
     "type": "TextBlock",
     "text": "What a beautiful background"
     }
     ]
     }
     ],
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "version": "1.2"
     }

     

     

  • Wesso Profile Picture
    51 on at

    I can't help you much but I'm curious... how are you able to post adaptive cards with "PVA in Teams" licence? 

    I may have misunderstood this section of the forum but I thought this is only for users who only have access to PVA in Teams as opposed to the full PVA licence.

     

    PVA in Teams: Overview of Power Virtual Agents in Microsoft Teams - Power Virtual Agents | Microsoft Docs

  • PowerUser14 Profile Picture
    8 on at

    Hi @Wesso the following link explains how to post an Adaptive Card in Power Virtual Agent:

    https://docs.microsoft.com/en-us/power-virtual-agents/advanced-bot-framework-composer-example1

     

    Thank you

  • Wesso Profile Picture
    51 on at

    Hi @PowerUser14 Thanks for sharing this. I must have misunderstood this section in the forum, I thought this section was only for users who has the PVA in Teams licence (which is different to the full PVA licence). We have the PVA in Teams licence and this doesn’t allow us to access the web app of PVA so we can’t edit much except for what’s in the authoring canvas. This does also mean we are unable to post adaptive cards. 

    Thanks for the link. 

  • 5tephan Profile Picture
    12 on at

    That helped me a lot.

     

    I'm using

     

    "backgroundImage": {
    "url": "data:image/gif;base64,R0lGODdhCAABAIAAAJHOgQAAACwAAAAACAABAAACA4RvBQA7",
    "fillMode": "Repeat"

    That's an 8 by 1 one-color GIF.

     

    The part `AJHOgQ` is the color (green). It's the base 64 encoding of the bytes `00 91 ce 81`.

     

    NOTE: The ":" should be a normal ":" but somehow it's always replaced by ":", so I selected another colon to make it at least look correct.

  • 5tephan Profile Picture
    12 on at

    For everybody's convenience, I've just created a small Javascript Online Tool to create the code for any background color you wish.

     

    Please find my Adaptive-Card GIF-Creator here

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard