Closed yogiderek closed 5 years ago
While each host is free to pick its preferred colors for the various named colors Adaptive provides, it does seem that Slack and Telegram should invert the attention and warning colors as red is usually the better color for a "warning"
With some help from Slack, the following link message-attachments defines the colours used as good (green), warning (orange) and danger (red) whereas the adaptive cards use good (green), attention (yellow) and warning (red). According to slack technical the colours should, "exactly match the color wording in Slack."
If I am right then the first two columns show what happens just now and the last column shows what it should be to map to Slacks colours.
Slack MS Bot (Now) MS Bot (Corrected)
---------------------- -------------------- -------------------------
good (green) Good (green) Good (green)
warning (orange) Attention (yellow) Warning (yellow)
danger (red) Warning (red) Danger (red)
Hi @yogiderek thanks for reporting this. Looks like we've got the colors swapped.
@eanders-MS FYI
Hm, I will check the host configs of each channel....
Adaptive doesn't have a "danger" color though. I'm not sure I'm following here.
You are right, AdaptiveCards does not define the Danger colour. Perhaps this explains it better....
According to slack, the colour names must match the slack colour names exactly.
the 'good' names match exactly, so text colour is green (slacks definition)
the switch happens here 'warning' names match so the text colour is orange (slacks definition) 'Attention' name is not defined by slack so it is possible that slack defaults to red in an error condition if the string is not found.
Although the slack docs state that you can define a custom hex colour, Attention is a string and not a hex value.
I could not find anything in the Telegram docs defining what colours they use.
To clarify things: Adaptive Cards are rendered server-side as images in Slack and Telegram. The color scheme Slack documents is therefore irrelevant in this context. As @matthidinger was suggesting, it looks like our image renderer has the warning and attention colors swapped.
The Host Config in use by the Bot Framework for server-side rendering looks correct. As previously mentioned, the colors might be getting swapped in the WPF renderer.
Seems like this is fixed in WPF now as of 1.2 (and potentially earlier)
Bot Info
Issue Description
In Web Chat my adaptive card correctly shows notification text related to today and tomorrow in red and 2 days from today in yellow. However, in Slack and Telegram, the notification text colour is swapped around i.e. text related to today and tomorrow is yellow and 2 days from today is now red.
Note also that the alignment of images is correct in both Slack and Telegram but not in Chat.
Code Example
Expected Behaviour
Text colour to be consistent across all channels.
Actual Results
Red is now yellow and yellow is now red in the Slack and Telegram channels. See screenshots, image order is Web Chat, Slack, Telegram.