FaceLog

by IPWright83

JavaScript

// const blank = "color: #ffffff";
// const hair = "color: #b97a57";
//const face = "color: #f3d5ab";
//const shadow = "color: #ecbd7d";

const repeat = (count) => "%c" + new Array(count * 2 + 1).join("█");
const blank = (count) => ({ str: repeat(count), style: "color: #ffffff" }); 
const hair = (count) => ({ str: repeat(count), style: "color: #b97a57" });
const eye = (count) => ({ str: repeat(count), style: "color: #ffffff" });
const pupil = (count) => ({ str: repeat(count), style: "color: #6d92be" });
const face = (count) => ({ str: repeat(count), style: "color: #f3d5ab" });
const shadow = (count) => ({ str: repeat(count), style: "color: #ecbd7d" });
const nose = (count) => ({ str: repeat(count), style: "color: #ecbd7d" });
const mouth = (count) => ({ str: repeat(count), style: "color: #ffaec9" });
const name = () => ({ str: "%cIan Wright (2014-2019)", style: "color: #000000" });
const link = () => ({ str: "%c     https://www.linkedin.com/in/ipwright/" });

const br = () => ({ str: "%c\r\n", style: "" });

const values = [
	blank(5), hair(7), blank(4), br(),
  blank(3), hair(10), blank(3), br(),
  blank(2), hair(4), face(6), hair(2), blank(2), br(),
  blank(2), hair(2), face(8), hair(2), blank(2), br(),
  blank(2), hair(1), face(10), hair(1), blank(2), br(),
  blank(2), hair(1), face(1), hair(2), shadow(1), face(2), shadow(1), hair(2), face(1), hair(1), blank(2), br(),
  blank(2), hair(1), face(1), shadow(1), face(6), shadow(1), face(1), hair(1), blank(2), br(),
  blank(2), face(2), eye(1), pupil(1), eye(1), face(2), eye(1), pupil(1), eye(1), face(2), blank(2), br(),
  blank(2), face(2), eye(3), face(2), eye(3), face(2), blank(2), br(),
  blank(2), face(12), blank(2), br(),
  blank(2), face(5), nose(2), face(5), blank(2), br(),
  blank(3), face(10), blank(3), br(),
  blank(3), face(3), mouth(4), face(3), blank(3), br(),
  blank(4), face(8), blank(4), br(),
  blank(5), face(6), blank(5), br(),
  br(),
  name(), link(), br(),
];

const chars = values.map(v =>...