@Sigur You do not need any library, and, what is more important, no ifthen package.
\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[
vertex/.style={draw, circle, inner sep=0, minimum size=0.12cm}
]
\foreach \x in {0,1,...,6} {
\foreach \y in {0,1,...,7} {
\pgfmathsetmacro{\mycolor}{ifthenelse(\x > 0 && \x < 6 && \y >0 && \y < 6,
"green","blue")}
\node at (\x*0.4,\y*0.4) [vertex, color=\mycolor] {};
}
}
\begin{scope}[local bounding box=BB]
\foreach \x in {0,1,...,3} {