Hello,

When using \definetextbackground in RTL setting, the boundaries are not determined correctly (both for location=paragraph and location=text) and colors gets messed up.

Here a sort-of-minimal example adapted from details.pdf.  Is there any particular keys I should use in RTL to fix the issue?


\setupcolors[state=start]
\definecolor[infogray][s=0.5]
\definecolor[textgray][s=0.8]

\definetextbackground[intro]
                     [backgroundcolor=infogray,
                       backgroundoffset=.25cm,
                       offset=.5cm,
                       frame=on,framecolor=red,
                       location=paragraph,
                       color=white]

\definetextbackground[subintro]
                     [backgroundcolor=textgray,
                       backgroundoffset=0pt,
                       offset=0pt,
                       frame=off,
                       location=text,
                       color=blue]

\starttext

\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground

\blank[3*big]

\righttoleft
\starttextbackground[intro]
A rather common way to draw attention to a passage, is to add
a background. In this chapter we will therefore discuss how
to enhance your document with \starttextbackground [subintro]
colorful areas that either or not follow the shape of your
paragraph. \stoptextbackground\ Be warned: this chapter has
so many backgrounds that you should consider wearing sunglasses.
\stoptextbackground
\stoptext


Thanks,
MHB