I am trying to define an rgb color. More specifically I want to create this color
which in rgb
mode it's (98,190,177)
.
I tried to define this color using the following code
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\definecolor{tank}{rgb}{0.098,0.190,0.177}
%\definecolor{tank}{rgb}{98,190,177}
\begin{tikzpicture}
\coordinate (tank) at (0,0);
\draw[red, fill=tank] (-2,0.5)--(-0.5,1)--(0.5,1)--(2,0.5)--(2,-0.5)--(0.5,-1)--(-0.5,-1)--(-2,-0.5)--cycle;
\end{tikzpicture}
\end{document}
but the output is totally different from what I am trying to achieve
I also tried to use \definecolor{tank}{rgb}{98,190,177}
but I get no color at all. How to properly define an rgb color?
\definecolor{tank}{RGB}{98,190,177}
, note the uppercase.rgb
, but with proper scaling of your values, dividing by255
, rather than1000
as you did in your MWE.255
is the maximum representable by one byte which is whatRGB
allocates to represent each base colour's value.