# How can i write with red color?

**URL:** <https://discuss.elastic.co/t/how-can-i-write-with-red-color/336764>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [June 23, 2023, 11:30am UTC](https://discuss.elastic.co/t/how-can-i-write-with-red-color/336764 "2023-06-23T11:30:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hocine\_MEZOUGHI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hocine_mezoughi/32/122633_2.png) [@Hocine\_MEZOUGHI](https://discuss.elastic.co/u/Hocine_MEZOUGHI)\
**Post date:** [June 23, 2023, 11:30am UTC](https://discuss.elastic.co/t/how-can-i-write-with-red-color/336764/1 "2023-06-23T11:30:16Z")

</div>

I have a WATCHER that calculates the percentage difference and I'd like to write this difference in red in the body of the email.

Using like this : {{ecart}}

My example doesn't work, what wrong ????

"actions": {  
"send\_email": {  
"email": {  
"profile": "standard",  
"to": [  
"[myadreess@toto.com](mailto:myadreess@toto.com)"  
],  
"subject": "[ALERTE] Ecart entre TOTAL\_TIME et PROVIDER\_TIME détecté",  
"body": {  
"html": "Détection sur les 5 dernieres minutes d'un ecart entre le TotalTime et le ProviderTime _(temps de traitement EIP long long)_ !   
  
 {{#ctx.payload.events}} BusinessLine : **_{{service}} :_**   
 - Nombre de hits: **{{count}}** appels de WS sur cette BL   
 ---\> Moyenne du TOTAL\_TIME : **{{avgTotalTime}} ms** _(calculé sur les {{count}} appels)_  
 ---\> Moyenne du PROVIDER\_TIME : **{{avgProviderTime}} ms** _(calculé sur les {{count}} appels)_   
 ---\> Pourcentage d'ecart: **{{pct\_ecart}} %** {{ecart}}   
  
 {{/ctx.payload.events}}   
 Merci de vérifier sur le Dashboard QOS ou sur le lien suivant : Lien vers le dashboard"  
}  
}  
}  
},

> Blockquote

---

<div class="post-metadata">

**Author:** ![Hocine\_MEZOUGHI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hocine_mezoughi/32/122633_2.png) [@Hocine\_MEZOUGHI](https://discuss.elastic.co/u/Hocine_MEZOUGHI)\
**Post date:** [June 23, 2023, 11:48am UTC](https://discuss.elastic.co/t/how-can-i-write-with-red-color/336764/2 "2023-06-23T11:48:36Z")

</div>

i used a font to colour 2 % in red but it doesn't works

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/4/4/444a5aec00546b0106795662debd30e023258fd0.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2023, 11:49am UTC](https://discuss.elastic.co/t/how-can-i-write-with-red-color/336764/3 "2023-07-21T11:49:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
