use super::models::CellNd; use mrlycore::cell::mapping; use mrlycore::colors::Color; use mrlycore::enums::Mode; use std::collections::HashMap; /// Colors the cell through the given mapping and mode, defaulting to the standard palette by type. pub fn paint( cell: CellNd, custom: Option<&HashMap>>, mode: Option, ) -> CellNd { let defaults = mapping(); let mapping = custom.unwrap_or(&defaults); cell.paint(mapping, mode.unwrap_or(Mode::Type)) }