src/vs/workbench/contrib/debug/browser/debugANSIHandling.ts/appendStylizedStringToContainer
export function appendStylizedStringToContainer(
	root: HTMLElement,
	stringContent: string,
	cssClasses: string[],
	linkDetector: LinkDetector,
	workspaceFolder: IWorkspaceFolder | undefined,
	customTextColor?: RGBA,
	customBackgroundColor?: RGBA,
	customUnderlineColor?: RGBA
): void {
	if (!root || !stringContent) {
		return;
	}

	const container = linkDetector.linkify(stringContent, true, workspaceFolder);

	container.className = cssClasses.join(' ');
	if (customTextColor) {
		container.style.color =
			Color.Format.CSS.formatRGB(new Color(customTextColor));
	}
	if (customBackgroundColor) {
		container.style.backgroundColor =
			Color.Format.CSS.formatRGB(new Color(customBackgroundColor));
	}
	if (customUnderlineColor) {
		container.style.textDecorationColor =
			Color.Format.CSS.formatRGB(new Color(customUnderlineColor));
	}
	root.appendChild(container);
}