2
votes

I am using AWS Lambda with a webhook to post to a Teams Channel. How do I change the text color in the card?

AFAIK, Adaptive Cards are not an option for webhooks yet. I have tried using the Message Card playground but there is not an option for the legacy Message Card, and other sites I've looked at don't have a text color option.

I'd like to change the color of the title, but the following has not worked.

Code I've tried:

data = {
            "@context": "https://schema.org/extensions",
            "@type": "MessageCard",
            "themeColor": "0072C6",
            "color": "FF0000",
            "title": self.title + " Severity: " + str(self.severity),
            "text": self.findings + "\n Account: "+self.account+" \nTags: " + json.dumps(self.tags)} ```
2
As of now we don't support text color style for messages card but you can use Text Formatting for messages card.Trinetra-MSFT
@Trinetra-MSFT thanks for letting me know!Francesca

2 Answers

2
votes

It is possible by HTML formatting eg. in title or text. It works for me

<strong style="color:blue;"> My title </strong>
1
votes

As @Trinetra-MSFT mentioned, there is not an option to change text color in MS Message Cards.