#!/usr/bin/env bash

# Color module to use for display functions (layouts, etc...)
# For loops, avoid them, as they spawn subshells

# Precompute the variables in loops
# local GREEN="\033[0;32m" RED="\033[0;31m" RESET="\033[0m"
# printf "${GREEN}+${accepts}${RESET} ${RED}-${drops}${RESET}\n"

function color::green()     { printf "\033[0;32m%s\033[0m" "${1:-}"; }
function color::red()       { printf "\033[0;31m%s\033[0m" "${1:-}"; }
function color::gray()      { printf "\033[0;37m%s\033[0m" "${1:-}"; }
function color::bold()      { printf "\033[1;37m%s\033[0m" "${1:-}"; }
function color::cyan()      { printf "\033[0;36m%s\033[0m" "${1:-}"; }
function color::yellow()    { printf "\033[1;33m%s\033[0m" "${1:-}"; }
function color::dim()       { printf "\033[2m%s\033[0m" "$*"; }