I have different symbols represent different cases for my study such as \triangledown
, \vartriangle
and \circ
. I wanted to change the color of the symbol to represent different cases using rgb. I defined the color but only the color of the outline is changed only. I wanted the symbol to be filled with color too. Can anyone help?
Thank you
\documentclass[]{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage{gensymb}
\usepackage{amsmath,amssymb,latexsym}
\usepackage{color}
%%define color
\definecolor{light-gray}{rgb}{0.2,0.2,0.2}
\definecolor{gray}{rgb{0.5,0.5,0.5}
\definecolor{dark-gray}{rgb}{0.8,0.8,0.8}
\newcommand{\ulg}{{\color{light-gray}$\vartriangle$}}
\newcommand{\ug}{{\color{gray}$\vartriangle$}}
\newcommand{\udg}{{\color{dark-gray}$\vartriangle$}}
\newcommand{\dlg}{{\color{light-gray}$\triangledown$}}
\newcommand{\dg}{{\color{gray}$\triangledown$}}
\newcommand{\ddg}{{\color{dark-gray}$\triangledown$}}
\newcommand{\olg}{{\color{light-gray}$\circ$}}
\newcommand{\og}{{\color{gray}$\circ$}}
\newcommand{\odg}{{\color{dark-gray}$\circ$}}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Details of the computational mesh.}
\begin{tabular}{|l|c|c|c|c|}
\hline
Case & Symbol & S & h/l & N\textsubscript{cells} \\ \hline
& \ulg & & & \\
& \olg & & & \\
& \dlg & & & \\ \hline
& \ug & & & \\
& \og & & & \\
& \dg & & & \\ \hline
& \udg & & & \\
& \odg & & & \\
& \ddg & & & \\ \hline
\end{tabular}%
\end{table}%
\end{document}