% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_brainGraph_attributes.R
\name{set_graph_colors}
\alias{set_graph_colors}
\title{Color graph vertices and edges}
\usage{
set_graph_colors(g, name, memb)
}
\arguments{
\item{g}{An \code{igraph} graph object}

\item{name}{Character string of the name of the attribute to add}

\item{memb}{An integer vector representing membership of e.g. a community}
}
\value{
The same graph with additional vertex and edge attributes
}
\description{
\code{set_graph_colors} takes an integer vector representing membership of
some grouping (e.g., a community or connected component) and creates a
character vector of colors for each grouping. Isolated vertices will be
colored \emph{gray}. Edges are assigned the same color if connected to
vertices in the same group, and assigned \emph{gray} otherwise.
}
\keyword{internal}
