/** * Makes bg color code * * @param string $color * @return string */ public static function bgColor($color) { return Code::make(Code::BG_COLOR, [Code::colorCode($color)]); }
public function code() { Code::make(); }
/** * Composes styled string * * @return string */ public function compose() { $prefix = Code::makeStyle($this->fgColor, $this->bgColor, $this->attributes); $suffix = ''; if (!empty($prefix)) { $suffix = Code::make(Code::STYLE_RESET); } return $prefix . $this->text . $suffix; }