getting colored text in rtf file from R markdown

Dear,

Any idea about how to generate a rtf file containing colored text from R markdown.
or any workaround solution.
Personally, rendering the value in red color works perfectly when using html_document from YAML. The use of r text_spec(my_variable[1],color = "red") woks very well. Unfortunately, when running knit with rtf_document, everything is in black and white.
I tried to use the pandoc_convert function but without success. But, I may not know how to use it optimally.
Any support is welcome

Kind regards
Bruno B.

Where text_spec is coming from ?

I don't know of any R function that can allow you to color text for RTF. Maybe there is some I don't know.

However, you could still write your own.

Example for HTML et PDF: 5.1 Font color | R Markdown Cookbook