hirc

[archived] IRC client
git clone https://hhvn.uk/hirc
git clone git://hhvn.uk/hirc
Log | Files | Refs

colours.h (1656B)


      1 /*
      2  * src/data/colours.c from hirc
      3  *
      4  * Copyright (c) 2021 hhvn <dev@hhvn.uk>
      5  *
      6  * Permission to use, copy, modify, and distribute this software for any
      7  * purpose with or without fee is hereby granted, provided that the above
      8  * copyright notice and this permission notice appear in all copies.
      9  *
     10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     17  *
     18  */
     19 
     20 #define HIRC_COLOURS 100
     21 static unsigned short colourmap[HIRC_COLOURS] = {
     22 	/* original 16 mirc colours
     23 	 * some clients use the first 16 ansi colours for this,
     24 	 * but here I use the 256 colours to ensure terminal-agnosticism */
     25 	[0] = 255, 16, 19, 46, 124, 88,  127, 184,
     26 	[8] = 208, 46, 45, 51, 21,  201, 240, 255,
     27 
     28 	/* extended */
     29 	[16] = 52,  94,  100, 58,  22,  29,  23,  24,  17,  54,  53,  89,
     30 	[28] = 88,  130, 142, 64,  28,  35,  30,  25,  18,  91,  90,  125,
     31 	[40] = 124, 166, 184, 106, 34,  49,  37,  33,  19,  129, 127, 161,
     32 	[52] = 196, 208, 226, 154, 46,  86,  51,  75,  21,  171, 201, 198,
     33 	[64] = 203, 215, 227, 191, 83,  122, 87,  111, 63,  177, 207, 205,
     34 	[76] = 217, 223, 229, 193, 157, 158, 159, 153, 147, 183, 219, 212,
     35 	[88] = 16,  233, 235, 237, 239, 241, 244, 247, 250, 254, 231,
     36 
     37 	/* transparency */
     38 	[99] = -1
     39 };