% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Colors.R
\name{save_colors}
\alias{save_colors}
\title{Save Custom Color Settings to a Seurat Object}
\usage{
save_colors(seu, col_list)
}
\arguments{
\item{seu}{A Seurat object to which the color settings will be saved.}

\item{col_list}{A list of color settings where names correspond to variable names and values are the colors to be associated with each variable.}
}
\value{
The modified Seurat object with updated color settings in the `misc` slot.
}
\description{
This function stores custom color settings within a Seurat object, allowing these settings to be reused across various visualization functions within the Seurat environment.
}
\details{
`save_colors` enhances workflow efficiency by centralizing color management within the Seurat object. This enables consistent and coherent visualizations across multiple plots, reducing the need for repeated color specifications and ensuring that plots are both aesthetically pleasing and informative.
}
\examples{
library(SeuratExtend)

# Define custom colors for different clusters and genes
custom_colors <- list(
  "cluster" = "pro_blue",
  "CD14" = "D",
  "CD3D" = c("#EEEEEE", "black")
)
# Save these colors to the Seurat object
pbmc <- save_colors(pbmc, custom_colors)
# Use the colors in DimPlot2
DimPlot2(pbmc, features = c("cluster", "CD14", "CD3D"))

}
