내 코드는 다음과 같습니다
\documentclass[]{article}
\usepackage{array,booktabs,makecell}
\usepackage{relsize}
\usepackage{collcell}
\usepackage[table]{xcolor}
\usepackage{pgf} %
\usepackage[flushleft]{threeparttable}
\definecolor{highNeuro}{HTML}{F8F7F5}
\definecolor{lowNeuro}{HTML}{7B3A98}
\newcommand*{\opacity}{100}%
\newcommand*{\minvalNeuro}{-1.0}%
\newcommand*{\maxvalNeuro}{0.5}%
\newcommand{\gradientNeuro}[1]{
% The values are calculated linearly between \minvalNeuro and \maxvalNeuro
\ifdimcomp{#1pt}{>}{\maxvalNeuro pt}{#1}{
\ifdimcomp{#1pt}{<}{\minvalNeuro pt}{#1}{
\pgfmathparse{int(round(100*(#1/(\maxvalNeuro-\minvalNeuro))-(\minvalNeuro*(100/(\maxvalNeuro-\minvalNeuro)))))}
\xdef\tempa{\pgfmathresult}
\cellcolor{highNeuro!\tempa!lowNeuro!\opacity} #1
}}
}
\definecolor{highICC}{HTML}{7B3A98}
\definecolor{lowICC}{HTML}{F8F7F5}
\newcommand*{\minvalICC}{-0.5}%
\newcommand*{\maxvalICC}{1.0}%
\newcommand{\gradientICC}[1]{
% The values are calculated linearly between \minvalICC and \maxvalICC
\ifdimcomp{#1pt}{>}{\maxvalICC pt}{#1}{
\ifdimcomp{#1pt}{<}{\minvalICC pt}{#1}{
\pgfmathparse{int(round(100*(#1/(\maxvalICC-\minvalICC))-(\minvalICC*(100/(\maxvalICC-\minvalICC)))))}
\xdef\tempa{\pgfmathresult}
\cellcolor{highICC!\tempa!lowICC!\opacity} #1
}}
}
\definecolor{highWMH}{HTML}{F8F7F5}
\definecolor{lowWMH}{HTML}{7B3A98}
\newcommand*{\minvalWMH}{-1.0}%
\newcommand*{\maxvalWMH}{0.5}%
\newcommand{\gradientWMH}[1]{
% The values are calculated linearly between \minvalWMH and \maxvalWMH
\ifdimcomp{#1pt}{>}{\maxvalWMH pt}{#1}{
\ifdimcomp{#1pt}{<}{\minvalWMH pt}{#1}{
\pgfmathparse{int(round(100*(#1/(\maxvalWMH-\minvalWMH))-(\minvalWMH*(100/(\maxvalWMH-\minvalWMH)))))}
\xdef\tempa{\pgfmathresult}
\cellcolor{highWMH!\tempa!lowWMH!\opacity} #1
}}
}
\begin{document}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\textbf{ROI\textbackslash Network} &
\textbf{VoxResNet} &
\textbf{VNet} &
\textbf{3D Unet} &
\textbf{\begin{tabular}[c]{@{}c@{}}Attention\\ UNet\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}c@{}}AnatomyNet\\ (SE)\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}c@{}}AnatomyNet\\ (CE+SE)\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}c@{}}AnatomyNet\\ (Vanilla)\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}c@{}}AnatomyNet\\ (CE)\end{tabular}} &
\textbf{nnU-Net} &
\textbf{nnU-Net-CRUISE} \\ \hline
\textbf{Visual} & \gradientICC{0.40} & \gradientICC{0.27} & \gradientICC{0.39} & \gradientICC{0.40} & \gradientICC{0.32} & \gradientICC{0.41} & \gradientICC{0.34} & \gradientICC{0.53} & \gradientICC{0.54} & \gradientICC{0.55} \\ \hline
\textbf{Motor} & \gradientICC{0.59} & \gradientICC{0.03} & \gradientICC{0.25} & \gradientICC{0.03} & \gradientICC{0.11} & \gradientICC{0.04} & \gradientICC{0.08} & \gradientICC{0.46} & \gradientICC{0.72} & \gradientICC{0.75} \\ \hline
\end{tabular}
\end{document}
다음과 같이 출력이 생성되었습니다.
HTML 형식으로 변환해야 합니다. 이를 위해 Make4ht
테이블이 색상 없이 멋지게 변환되었습니다. HTML 파일에도 색상이 필요합니다. 조언해 주세요.