This question is an extension of the one posed a while back in Adding a Letter to an Image in a Do-It-Yourself Lettrine
Consider the MWE
\documentclass{book}
\usepackage{lettrine}
\usepackage{xcolor}
\definecolor{imperialred}{RGB}{239, 38, 50}
\definecolor{deepskyblue}{RGB}{34, 154, 202}
\usepackage{scalerel,stackengine}
\setlength{\textwidth}{5.25in}
\fboxsep=2.25pt
\newcommand\my[2][7ex]{\scaleto{\colorbox{deepskyblue}{%
\textcolor{imperialred}{\abovebaseline[0pt]{#2}}}}{#1},}
\begin{document}
\thispagestyle{empty}
\LARGE
\lettrine[nindent=.4em]{\bfseries\my I}{} would like add a frame (or perhaps, some other kind of a decorative border) around this this box.
\lettrine[nindent=.4em]{\my T}{he} commands of tcolorbox do not seem to be applicable here.
\end{document}
with the output
QUESTION: How may I add a colored frame of adjustable thickness (or perhaps, some other kind of decorative border) around the blue ``do-it-yourself'' lettrines?
Thank you.


\colorbox{color1}by\fcolorbox{color2}{color1}(with "f" of "f"rame for color 2) and, optionally, you can add before\fboxruleto set the thickness of the frame to 5pt (or what you want). – Fran May 12 '22 at 16:23