Skip to content

Instantly share code, notes, and snippets.

@kodie
Last active November 26, 2024 19:47
Show Gist options
  • Save kodie/b63881ccf4368e9e00c0c3277779524a to your computer and use it in GitHub Desktop.
Save kodie/b63881ccf4368e9e00c0c3277779524a to your computer and use it in GitHub Desktop.
Collection of 256 color names for the terminal
<?php
// For use with https://github.com/adhocore/php-cli
// Color names taken from https://www.ditig.com/publications/256-colors-cheat-sheet
// Some color names are duplicated with different values :shrug:
// Swap fg256 with bg256 for background color value
$black = \Ahc\Cli\Output\Color::BLACK;
$red = \Ahc\Cli\Output\Color::RED;
$green = \Ahc\Cli\Output\Color::GREEN;
$yellow = \Ahc\Cli\Output\Color::YELLOW;
$blue = \Ahc\Cli\Output\Color::BLUE;
$purple = \Ahc\Cli\Output\Color::PURPLE;
$cyan = \Ahc\Cli\Output\Color::CYAN;
$white = \Ahc\Cli\Output\Color::WHITE;
$gray = \Ahc\Cli\Output\Color::GRAY;
$darkgray = \Ahc\Cli\Output\Color::DARKGRAY;
$black = \Ahc\Cli\Output\Color::fg256(0);
$maroon = \Ahc\Cli\Output\Color::fg256(1);
$green = \Ahc\Cli\Output\Color::fg256(2);
$olive = \Ahc\Cli\Output\Color::fg256(3);
$navy = \Ahc\Cli\Output\Color::fg256(4);
$purple = \Ahc\Cli\Output\Color::fg256(5);
$teal = \Ahc\Cli\Output\Color::fg256(6);
$silver = \Ahc\Cli\Output\Color::fg256(7);
$grey = \Ahc\Cli\Output\Color::fg256(8);
$red = \Ahc\Cli\Output\Color::fg256(9);
$lime = \Ahc\Cli\Output\Color::fg256(10);
$yellow = \Ahc\Cli\Output\Color::fg256(11);
$blue = \Ahc\Cli\Output\Color::fg256(12);
$fuchsia = \Ahc\Cli\Output\Color::fg256(13);
$aqua = \Ahc\Cli\Output\Color::fg256(14);
$white = \Ahc\Cli\Output\Color::fg256(15);
$grey0 = \Ahc\Cli\Output\Color::fg256(16);
$navyblue = \Ahc\Cli\Output\Color::fg256(17);
$darkblue = \Ahc\Cli\Output\Color::fg256(18);
$blue3 = \Ahc\Cli\Output\Color::fg256(19);
$blue3 = \Ahc\Cli\Output\Color::fg256(20);
$blue1 = \Ahc\Cli\Output\Color::fg256(21);
$darkgreen = \Ahc\Cli\Output\Color::fg256(22);
$deepskyblue4 = \Ahc\Cli\Output\Color::fg256(23);
$deepskyblue4 = \Ahc\Cli\Output\Color::fg256(24);
$deepskyblue4 = \Ahc\Cli\Output\Color::fg256(25);
$dodgerblue3 = \Ahc\Cli\Output\Color::fg256(26);
$dodgerblue2 = \Ahc\Cli\Output\Color::fg256(27);
$green4 = \Ahc\Cli\Output\Color::fg256(28);
$springgreen4 = \Ahc\Cli\Output\Color::fg256(29);
$turquoise4 = \Ahc\Cli\Output\Color::fg256(30);
$deepskyblue3 = \Ahc\Cli\Output\Color::fg256(31);
$deepskyblue3 = \Ahc\Cli\Output\Color::fg256(32);
$dodgerblue1 = \Ahc\Cli\Output\Color::fg256(33);
$green3 = \Ahc\Cli\Output\Color::fg256(34);
$springgreen3 = \Ahc\Cli\Output\Color::fg256(35);
$darkcyan = \Ahc\Cli\Output\Color::fg256(36);
$lightseagreen = \Ahc\Cli\Output\Color::fg256(37);
$deepskyblue2 = \Ahc\Cli\Output\Color::fg256(38);
$deepskyblue1 = \Ahc\Cli\Output\Color::fg256(39);
$green3 = \Ahc\Cli\Output\Color::fg256(40);
$springgreen3 = \Ahc\Cli\Output\Color::fg256(41);
$springgreen2 = \Ahc\Cli\Output\Color::fg256(42);
$cyan3 = \Ahc\Cli\Output\Color::fg256(43);
$darkturquoise = \Ahc\Cli\Output\Color::fg256(44);
$turquoise2 = \Ahc\Cli\Output\Color::fg256(45);
$green1 = \Ahc\Cli\Output\Color::fg256(46);
$springgreen2 = \Ahc\Cli\Output\Color::fg256(47);
$springgreen1 = \Ahc\Cli\Output\Color::fg256(48);
$mediumspringgreen = \Ahc\Cli\Output\Color::fg256(49);
$cyan2 = \Ahc\Cli\Output\Color::fg256(50);
$cyan1 = \Ahc\Cli\Output\Color::fg256(51);
$darkred = \Ahc\Cli\Output\Color::fg256(52);
$deeppink4 = \Ahc\Cli\Output\Color::fg256(53);
$purple4 = \Ahc\Cli\Output\Color::fg256(54);
$purple4 = \Ahc\Cli\Output\Color::fg256(55);
$purple3 = \Ahc\Cli\Output\Color::fg256(56);
$blueviolet = \Ahc\Cli\Output\Color::fg256(57);
$orange4 = \Ahc\Cli\Output\Color::fg256(58);
$grey37 = \Ahc\Cli\Output\Color::fg256(59);
$mediumpurple4 = \Ahc\Cli\Output\Color::fg256(60);
$slateblue3 = \Ahc\Cli\Output\Color::fg256(61);
$slateblue3 = \Ahc\Cli\Output\Color::fg256(62);
$royalblue1 = \Ahc\Cli\Output\Color::fg256(63);
$chartreuse4 = \Ahc\Cli\Output\Color::fg256(64);
$darkseagreen4 = \Ahc\Cli\Output\Color::fg256(65);
$paleturquoise4 = \Ahc\Cli\Output\Color::fg256(66);
$steelblue = \Ahc\Cli\Output\Color::fg256(67);
$steelblue3 = \Ahc\Cli\Output\Color::fg256(68);
$cornflowerblue = \Ahc\Cli\Output\Color::fg256(69);
$chartreuse3 = \Ahc\Cli\Output\Color::fg256(70);
$darkseagreen4 = \Ahc\Cli\Output\Color::fg256(71);
$cadetblue = \Ahc\Cli\Output\Color::fg256(72);
$cadetblue = \Ahc\Cli\Output\Color::fg256(73);
$skyblue3 = \Ahc\Cli\Output\Color::fg256(74);
$steelblue1 = \Ahc\Cli\Output\Color::fg256(75);
$chartreuse3 = \Ahc\Cli\Output\Color::fg256(76);
$palegreen3 = \Ahc\Cli\Output\Color::fg256(77);
$seagreen3 = \Ahc\Cli\Output\Color::fg256(78);
$aquamarine3 = \Ahc\Cli\Output\Color::fg256(79);
$mediumturquoise = \Ahc\Cli\Output\Color::fg256(80);
$steelblue1 = \Ahc\Cli\Output\Color::fg256(81);
$chartreuse2 = \Ahc\Cli\Output\Color::fg256(82);
$seagreen2 = \Ahc\Cli\Output\Color::fg256(83);
$seagreen1 = \Ahc\Cli\Output\Color::fg256(84);
$seagreen1 = \Ahc\Cli\Output\Color::fg256(85);
$aquamarine1 = \Ahc\Cli\Output\Color::fg256(86);
$darkslategray2 = \Ahc\Cli\Output\Color::fg256(87);
$darkred = \Ahc\Cli\Output\Color::fg256(88);
$deeppink4 = \Ahc\Cli\Output\Color::fg256(89);
$darkmagenta = \Ahc\Cli\Output\Color::fg256(90);
$darkmagenta = \Ahc\Cli\Output\Color::fg256(91);
$darkviolet = \Ahc\Cli\Output\Color::fg256(92);
$purple = \Ahc\Cli\Output\Color::fg256(93);
$orange4 = \Ahc\Cli\Output\Color::fg256(94);
$lightpink4 = \Ahc\Cli\Output\Color::fg256(95);
$plum4 = \Ahc\Cli\Output\Color::fg256(96);
$mediumpurple3 = \Ahc\Cli\Output\Color::fg256(97);
$mediumpurple3 = \Ahc\Cli\Output\Color::fg256(98);
$slateblue1 = \Ahc\Cli\Output\Color::fg256(99);
$yellow4 = \Ahc\Cli\Output\Color::fg256(100);
$wheat4 = \Ahc\Cli\Output\Color::fg256(101);
$grey53 = \Ahc\Cli\Output\Color::fg256(102);
$lightslategrey = \Ahc\Cli\Output\Color::fg256(103);
$mediumpurple = \Ahc\Cli\Output\Color::fg256(104);
$lightslateblue = \Ahc\Cli\Output\Color::fg256(105);
$yellow4 = \Ahc\Cli\Output\Color::fg256(106);
$darkolivegreen3 = \Ahc\Cli\Output\Color::fg256(107);
$darkseagreen = \Ahc\Cli\Output\Color::fg256(108);
$lightskyblue3 = \Ahc\Cli\Output\Color::fg256(109);
$lightskyblue3 = \Ahc\Cli\Output\Color::fg256(110);
$skyblue2 = \Ahc\Cli\Output\Color::fg256(111);
$chartreuse2 = \Ahc\Cli\Output\Color::fg256(112);
$darkolivegreen3 = \Ahc\Cli\Output\Color::fg256(113);
$palegreen3 = \Ahc\Cli\Output\Color::fg256(114);
$darkseagreen3 = \Ahc\Cli\Output\Color::fg256(115);
$darkslategray3 = \Ahc\Cli\Output\Color::fg256(116);
$skyblue1 = \Ahc\Cli\Output\Color::fg256(117);
$chartreuse1 = \Ahc\Cli\Output\Color::fg256(118);
$lightgreen = \Ahc\Cli\Output\Color::fg256(119);
$lightgreen = \Ahc\Cli\Output\Color::fg256(120);
$palegreen1 = \Ahc\Cli\Output\Color::fg256(121);
$aquamarine1 = \Ahc\Cli\Output\Color::fg256(122);
$darkslategray1 = \Ahc\Cli\Output\Color::fg256(123);
$red3 = \Ahc\Cli\Output\Color::fg256(124);
$deeppink4 = \Ahc\Cli\Output\Color::fg256(125);
$mediumvioletred = \Ahc\Cli\Output\Color::fg256(126);
$magenta3 = \Ahc\Cli\Output\Color::fg256(127);
$darkviolet = \Ahc\Cli\Output\Color::fg256(128);
$purple = \Ahc\Cli\Output\Color::fg256(129);
$darkorange3 = \Ahc\Cli\Output\Color::fg256(130);
$indianred = \Ahc\Cli\Output\Color::fg256(131);
$hotpink3 = \Ahc\Cli\Output\Color::fg256(132);
$mediumorchid3 = \Ahc\Cli\Output\Color::fg256(133);
$mediumorchid = \Ahc\Cli\Output\Color::fg256(134);
$mediumpurple2 = \Ahc\Cli\Output\Color::fg256(135);
$darkgoldenrod = \Ahc\Cli\Output\Color::fg256(136);
$lightsalmon3 = \Ahc\Cli\Output\Color::fg256(137);
$rosybrown = \Ahc\Cli\Output\Color::fg256(138);
$grey63 = \Ahc\Cli\Output\Color::fg256(139);
$mediumpurple2 = \Ahc\Cli\Output\Color::fg256(140);
$mediumpurple1 = \Ahc\Cli\Output\Color::fg256(141);
$gold3 = \Ahc\Cli\Output\Color::fg256(142);
$darkkhaki = \Ahc\Cli\Output\Color::fg256(143);
$navajowhite3 = \Ahc\Cli\Output\Color::fg256(144);
$grey69 = \Ahc\Cli\Output\Color::fg256(145);
$lightsteelblue3 = \Ahc\Cli\Output\Color::fg256(146);
$lightsteelblue = \Ahc\Cli\Output\Color::fg256(147);
$yellow3 = \Ahc\Cli\Output\Color::fg256(148);
$darkolivegreen3 = \Ahc\Cli\Output\Color::fg256(149);
$darkseagreen3 = \Ahc\Cli\Output\Color::fg256(150);
$darkseagreen2 = \Ahc\Cli\Output\Color::fg256(151);
$lightcyan3 = \Ahc\Cli\Output\Color::fg256(152);
$lightskyblue1 = \Ahc\Cli\Output\Color::fg256(153);
$greenyellow = \Ahc\Cli\Output\Color::fg256(154);
$darkolivegreen2 = \Ahc\Cli\Output\Color::fg256(155);
$palegreen1 = \Ahc\Cli\Output\Color::fg256(156);
$darkseagreen2 = \Ahc\Cli\Output\Color::fg256(157);
$darkseagreen1 = \Ahc\Cli\Output\Color::fg256(158);
$paleturquoise1 = \Ahc\Cli\Output\Color::fg256(159);
$red3 = \Ahc\Cli\Output\Color::fg256(160);
$deeppink3 = \Ahc\Cli\Output\Color::fg256(161);
$deeppink3 = \Ahc\Cli\Output\Color::fg256(162);
$magenta3 = \Ahc\Cli\Output\Color::fg256(163);
$magenta3 = \Ahc\Cli\Output\Color::fg256(164);
$magenta2 = \Ahc\Cli\Output\Color::fg256(165);
$darkorange3 = \Ahc\Cli\Output\Color::fg256(166);
$indianred = \Ahc\Cli\Output\Color::fg256(167);
$hotpink3 = \Ahc\Cli\Output\Color::fg256(168);
$hotpink2 = \Ahc\Cli\Output\Color::fg256(169);
$orchid = \Ahc\Cli\Output\Color::fg256(170);
$mediumorchid1 = \Ahc\Cli\Output\Color::fg256(171);
$orange3 = \Ahc\Cli\Output\Color::fg256(172);
$lightsalmon3 = \Ahc\Cli\Output\Color::fg256(173);
$lightpink3 = \Ahc\Cli\Output\Color::fg256(174);
$pink3 = \Ahc\Cli\Output\Color::fg256(175);
$plum3 = \Ahc\Cli\Output\Color::fg256(176);
$violet = \Ahc\Cli\Output\Color::fg256(177);
$gold3 = \Ahc\Cli\Output\Color::fg256(178);
$lightgoldenrod3 = \Ahc\Cli\Output\Color::fg256(179);
$tan = \Ahc\Cli\Output\Color::fg256(180);
$mistyrose3 = \Ahc\Cli\Output\Color::fg256(181);
$thistle3 = \Ahc\Cli\Output\Color::fg256(182);
$plum2 = \Ahc\Cli\Output\Color::fg256(183);
$yellow3 = \Ahc\Cli\Output\Color::fg256(184);
$khaki3 = \Ahc\Cli\Output\Color::fg256(185);
$lightgoldenrod2 = \Ahc\Cli\Output\Color::fg256(186);
$lightyellow3 = \Ahc\Cli\Output\Color::fg256(187);
$grey84 = \Ahc\Cli\Output\Color::fg256(188);
$lightsteelblue1 = \Ahc\Cli\Output\Color::fg256(189);
$yellow2 = \Ahc\Cli\Output\Color::fg256(190);
$darkolivegreen1 = \Ahc\Cli\Output\Color::fg256(191);
$darkolivegreen1 = \Ahc\Cli\Output\Color::fg256(192);
$darkseagreen1 = \Ahc\Cli\Output\Color::fg256(193);
$honeydew2 = \Ahc\Cli\Output\Color::fg256(194);
$lightcyan1 = \Ahc\Cli\Output\Color::fg256(195);
$red1 = \Ahc\Cli\Output\Color::fg256(196);
$deeppink2 = \Ahc\Cli\Output\Color::fg256(197);
$deeppink1 = \Ahc\Cli\Output\Color::fg256(198);
$deeppink1 = \Ahc\Cli\Output\Color::fg256(199);
$magenta2 = \Ahc\Cli\Output\Color::fg256(200);
$magenta1 = \Ahc\Cli\Output\Color::fg256(201);
$orangered1 = \Ahc\Cli\Output\Color::fg256(202);
$indianred1 = \Ahc\Cli\Output\Color::fg256(203);
$indianred1 = \Ahc\Cli\Output\Color::fg256(204);
$hotpink = \Ahc\Cli\Output\Color::fg256(205);
$hotpink = \Ahc\Cli\Output\Color::fg256(206);
$mediumorchid1 = \Ahc\Cli\Output\Color::fg256(207);
$darkorange = \Ahc\Cli\Output\Color::fg256(208);
$salmon1 = \Ahc\Cli\Output\Color::fg256(209);
$lightcoral = \Ahc\Cli\Output\Color::fg256(210);
$palevioletred1 = \Ahc\Cli\Output\Color::fg256(211);
$orchid2 = \Ahc\Cli\Output\Color::fg256(212);
$orchid1 = \Ahc\Cli\Output\Color::fg256(213);
$orange1 = \Ahc\Cli\Output\Color::fg256(214);
$sandybrown = \Ahc\Cli\Output\Color::fg256(215);
$lightsalmon1 = \Ahc\Cli\Output\Color::fg256(216);
$lightpink1 = \Ahc\Cli\Output\Color::fg256(217);
$pink1 = \Ahc\Cli\Output\Color::fg256(218);
$plum1 = \Ahc\Cli\Output\Color::fg256(219);
$gold1 = \Ahc\Cli\Output\Color::fg256(220);
$lightgoldenrod2 = \Ahc\Cli\Output\Color::fg256(221);
$lightgoldenrod2 = \Ahc\Cli\Output\Color::fg256(222);
$navajowhite1 = \Ahc\Cli\Output\Color::fg256(223);
$mistyrose1 = \Ahc\Cli\Output\Color::fg256(224);
$thistle1 = \Ahc\Cli\Output\Color::fg256(225);
$yellow1 = \Ahc\Cli\Output\Color::fg256(226);
$lightgoldenrod1 = \Ahc\Cli\Output\Color::fg256(227);
$khaki1 = \Ahc\Cli\Output\Color::fg256(228);
$wheat1 = \Ahc\Cli\Output\Color::fg256(229);
$cornsilk1 = \Ahc\Cli\Output\Color::fg256(230);
$grey100 = \Ahc\Cli\Output\Color::fg256(231);
$grey3 = \Ahc\Cli\Output\Color::fg256(232);
$grey7 = \Ahc\Cli\Output\Color::fg256(233);
$grey11 = \Ahc\Cli\Output\Color::fg256(234);
$grey15 = \Ahc\Cli\Output\Color::fg256(235);
$grey19 = \Ahc\Cli\Output\Color::fg256(236);
$grey23 = \Ahc\Cli\Output\Color::fg256(237);
$grey27 = \Ahc\Cli\Output\Color::fg256(238);
$grey30 = \Ahc\Cli\Output\Color::fg256(239);
$grey35 = \Ahc\Cli\Output\Color::fg256(240);
$grey39 = \Ahc\Cli\Output\Color::fg256(241);
$grey42 = \Ahc\Cli\Output\Color::fg256(242);
$grey46 = \Ahc\Cli\Output\Color::fg256(243);
$grey50 = \Ahc\Cli\Output\Color::fg256(244);
$grey54 = \Ahc\Cli\Output\Color::fg256(245);
$grey58 = \Ahc\Cli\Output\Color::fg256(246);
$grey62 = \Ahc\Cli\Output\Color::fg256(247);
$grey66 = \Ahc\Cli\Output\Color::fg256(248);
$grey70 = \Ahc\Cli\Output\Color::fg256(249);
$grey74 = \Ahc\Cli\Output\Color::fg256(250);
$grey78 = \Ahc\Cli\Output\Color::fg256(251);
$grey82 = \Ahc\Cli\Output\Color::fg256(252);
$grey85 = \Ahc\Cli\Output\Color::fg256(253);
$grey89 = \Ahc\Cli\Output\Color::fg256(254);
$grey93 = \Ahc\Cli\Output\Color::fg256(255);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment