Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ xTerm support...

xTerm support...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2  3  4 

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #45 on Sun 08 Apr 2007 01:17 AM (UTC)
Message
Quote:
Are we agreed that the 6x6x6 colour cube is the correct one?
Nick, yes, that color cube is consistent with what I have seen elsewhere.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #46 on Sun 08 Apr 2007 09:07 PM (UTC)
Message
Please make posts about adding to the colour picker to this thread:

http://www.gammon.com.au/forum/?id=7775

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #47 on Sun 19 Oct 2014 12:12 AM (UTC)

Amended on Sun 19 Oct 2014 01:06 AM (UTC) by Nick Gammon

Message
After some more agonizing and discussion I have decided to revert to the Xterm colour cube from version 4.96 of MUSHclient. The Xterm cube favours brighter colours (the gap between colours is: 95 / 40 / 40 / 40 / 40).

The Netscape cube, used previously, has even colours, with a consistent gap of 51 / 51 / 51 / 51 / 51.

For backwards compatibility you can change to the Netscape cube by executing this Lua function call:


utils.colourcube (2)  -- Netscape cube


And you can change back to the Xterm cube by doing this:


utils.colourcube (1)  -- Xterm cube


This is a global change as the colour cube table is shared amongst all open worlds.

The current ANSI-256 codes will now be:


0 (black)                 R=  0 G=  0 B=  0 #000000 &h000000 0x000000 00000000
1 (maroon)                R=128 G=  0 B=  0 #800000 &h000080 0x000080 00000128
2 (green)                 R=  0 G=128 B=  0 #008000 &h008000 0x008000 00032768
3 (olive)                 R=128 G=128 B=  0 #808000 &h008080 0x008080 00032896
4 (navy)                  R=  0 G=  0 B=128 #000080 &h800000 0x800000 08388608
5 (purple)                R=128 G=  0 B=128 #800080 &h800080 0x800080 08388736
6 (teal)                  R=  0 G=128 B=128 #008080 &h808000 0x808000 08421376
7 (silver)                R=192 G=192 B=192 #C0C0C0 &hC0C0C0 0xC0C0C0 12632256
8 (gray)                  R=128 G=128 B=128 #808080 &h808080 0x808080 08421504
9 (red)                   R=255 G=  0 B=  0 #FF0000 &h0000FF 0x0000FF 00000255
10 (lime)                 R=  0 G=255 B=  0 #00FF00 &h00FF00 0x00FF00 00065280
11 (yellow)               R=255 G=255 B=  0 #FFFF00 &h00FFFF 0x00FFFF 00065535
12 (blue)                 R=  0 G=  0 B=255 #0000FF &hFF0000 0xFF0000 16711680
13 (magenta, fuchsia)     R=255 G=  0 B=255 #FF00FF &hFF00FF 0xFF00FF 16711935
14 (cyan, aqua)           R=  0 G=255 B=255 #00FFFF &hFFFF00 0xFFFF00 16776960
15 (white)                R=255 G=255 B=255 #FFFFFF &hFFFFFF 0xFFFFFF 16777215
16 (black)                R=  0 G=  0 B=  0 #000000 &h000000 0x000000 00000000
17                        R=  0 G=  0 B= 95 #00005F &h5F0000 0x5F0000 06225920
18                        R=  0 G=  0 B=135 #000087 &h870000 0x870000 08847360
19                        R=  0 G=  0 B=175 #0000AF &hAF0000 0xAF0000 11468800
20                        R=  0 G=  0 B=215 #0000D7 &hD70000 0xD70000 14090240
21 (blue)                 R=  0 G=  0 B=255 #0000FF &hFF0000 0xFF0000 16711680
22                        R=  0 G= 95 B=  0 #005F00 &h005F00 0x005F00 00024320
23                        R=  0 G= 95 B= 95 #005F5F &h5F5F00 0x5F5F00 06250240
24                        R=  0 G= 95 B=135 #005F87 &h875F00 0x875F00 08871680
25                        R=  0 G= 95 B=175 #005FAF &hAF5F00 0xAF5F00 11493120
26                        R=  0 G= 95 B=215 #005FD7 &hD75F00 0xD75F00 14114560
27                        R=  0 G= 95 B=255 #005FFF &hFF5F00 0xFF5F00 16736000
28                        R=  0 G=135 B=  0 #008700 &h008700 0x008700 00034560
29                        R=  0 G=135 B= 95 #00875F &h5F8700 0x5F8700 06260480
30                        R=  0 G=135 B=135 #008787 &h878700 0x878700 08881920
31                        R=  0 G=135 B=175 #0087AF &hAF8700 0xAF8700 11503360
32                        R=  0 G=135 B=215 #0087D7 &hD78700 0xD78700 14124800
33                        R=  0 G=135 B=255 #0087FF &hFF8700 0xFF8700 16746240
34                        R=  0 G=175 B=  0 #00AF00 &h00AF00 0x00AF00 00044800
35                        R=  0 G=175 B= 95 #00AF5F &h5FAF00 0x5FAF00 06270720
36                        R=  0 G=175 B=135 #00AF87 &h87AF00 0x87AF00 08892160
37                        R=  0 G=175 B=175 #00AFAF &hAFAF00 0xAFAF00 11513600
38                        R=  0 G=175 B=215 #00AFD7 &hD7AF00 0xD7AF00 14135040
39                        R=  0 G=175 B=255 #00AFFF &hFFAF00 0xFFAF00 16756480
40                        R=  0 G=215 B=  0 #00D700 &h00D700 0x00D700 00055040
41                        R=  0 G=215 B= 95 #00D75F &h5FD700 0x5FD700 06280960
42                        R=  0 G=215 B=135 #00D787 &h87D700 0x87D700 08902400
43                        R=  0 G=215 B=175 #00D7AF &hAFD700 0xAFD700 11523840
44                        R=  0 G=215 B=215 #00D7D7 &hD7D700 0xD7D700 14145280
45                        R=  0 G=215 B=255 #00D7FF &hFFD700 0xFFD700 16766720
46 (lime)                 R=  0 G=255 B=  0 #00FF00 &h00FF00 0x00FF00 00065280
47                        R=  0 G=255 B= 95 #00FF5F &h5FFF00 0x5FFF00 06291200
48                        R=  0 G=255 B=135 #00FF87 &h87FF00 0x87FF00 08912640
49                        R=  0 G=255 B=175 #00FFAF &hAFFF00 0xAFFF00 11534080
50                        R=  0 G=255 B=215 #00FFD7 &hD7FF00 0xD7FF00 14155520
51 (cyan, aqua)           R=  0 G=255 B=255 #00FFFF &hFFFF00 0xFFFF00 16776960
52                        R= 95 G=  0 B=  0 #5F0000 &h00005F 0x00005F 00000095
53                        R= 95 G=  0 B= 95 #5F005F &h5F005F 0x5F005F 06226015
54                        R= 95 G=  0 B=135 #5F0087 &h87005F 0x87005F 08847455
55                        R= 95 G=  0 B=175 #5F00AF &hAF005F 0xAF005F 11468895
56                        R= 95 G=  0 B=215 #5F00D7 &hD7005F 0xD7005F 14090335
57                        R= 95 G=  0 B=255 #5F00FF &hFF005F 0xFF005F 16711775
58                        R= 95 G= 95 B=  0 #5F5F00 &h005F5F 0x005F5F 00024415
59                        R= 95 G= 95 B= 95 #5F5F5F &h5F5F5F 0x5F5F5F 06250335
60                        R= 95 G= 95 B=135 #5F5F87 &h875F5F 0x875F5F 08871775
61                        R= 95 G= 95 B=175 #5F5FAF &hAF5F5F 0xAF5F5F 11493215
62                        R= 95 G= 95 B=215 #5F5FD7 &hD75F5F 0xD75F5F 14114655
63                        R= 95 G= 95 B=255 #5F5FFF &hFF5F5F 0xFF5F5F 16736095
64                        R= 95 G=135 B=  0 #5F8700 &h00875F 0x00875F 00034655
65                        R= 95 G=135 B= 95 #5F875F &h5F875F 0x5F875F 06260575
66                        R= 95 G=135 B=135 #5F8787 &h87875F 0x87875F 08882015
67                        R= 95 G=135 B=175 #5F87AF &hAF875F 0xAF875F 11503455
68                        R= 95 G=135 B=215 #5F87D7 &hD7875F 0xD7875F 14124895
69                        R= 95 G=135 B=255 #5F87FF &hFF875F 0xFF875F 16746335
70                        R= 95 G=175 B=  0 #5FAF00 &h00AF5F 0x00AF5F 00044895
71                        R= 95 G=175 B= 95 #5FAF5F &h5FAF5F 0x5FAF5F 06270815
72                        R= 95 G=175 B=135 #5FAF87 &h87AF5F 0x87AF5F 08892255
73                        R= 95 G=175 B=175 #5FAFAF &hAFAF5F 0xAFAF5F 11513695
74                        R= 95 G=175 B=215 #5FAFD7 &hD7AF5F 0xD7AF5F 14135135
75                        R= 95 G=175 B=255 #5FAFFF &hFFAF5F 0xFFAF5F 16756575
76                        R= 95 G=215 B=  0 #5FD700 &h00D75F 0x00D75F 00055135
77                        R= 95 G=215 B= 95 #5FD75F &h5FD75F 0x5FD75F 06281055
78                        R= 95 G=215 B=135 #5FD787 &h87D75F 0x87D75F 08902495
79                        R= 95 G=215 B=175 #5FD7AF &hAFD75F 0xAFD75F 11523935
80                        R= 95 G=215 B=215 #5FD7D7 &hD7D75F 0xD7D75F 14145375
81                        R= 95 G=215 B=255 #5FD7FF &hFFD75F 0xFFD75F 16766815
82                        R= 95 G=255 B=  0 #5FFF00 &h00FF5F 0x00FF5F 00065375
83                        R= 95 G=255 B= 95 #5FFF5F &h5FFF5F 0x5FFF5F 06291295
84                        R= 95 G=255 B=135 #5FFF87 &h87FF5F 0x87FF5F 08912735
85                        R= 95 G=255 B=175 #5FFFAF &hAFFF5F 0xAFFF5F 11534175
86                        R= 95 G=255 B=215 #5FFFD7 &hD7FF5F 0xD7FF5F 14155615
87                        R= 95 G=255 B=255 #5FFFFF &hFFFF5F 0xFFFF5F 16777055
88                        R=135 G=  0 B=  0 #870000 &h000087 0x000087 00000135
89                        R=135 G=  0 B= 95 #87005F &h5F0087 0x5F0087 06226055
90                        R=135 G=  0 B=135 #870087 &h870087 0x870087 08847495
91                        R=135 G=  0 B=175 #8700AF &hAF0087 0xAF0087 11468935
92                        R=135 G=  0 B=215 #8700D7 &hD70087 0xD70087 14090375
93                        R=135 G=  0 B=255 #8700FF &hFF0087 0xFF0087 16711815
94                        R=135 G= 95 B=  0 #875F00 &h005F87 0x005F87 00024455
95                        R=135 G= 95 B= 95 #875F5F &h5F5F87 0x5F5F87 06250375
96                        R=135 G= 95 B=135 #875F87 &h875F87 0x875F87 08871815
97                        R=135 G= 95 B=175 #875FAF &hAF5F87 0xAF5F87 11493255
98                        R=135 G= 95 B=215 #875FD7 &hD75F87 0xD75F87 14114695
99                        R=135 G= 95 B=255 #875FFF &hFF5F87 0xFF5F87 16736135
100                       R=135 G=135 B=  0 #878700 &h008787 0x008787 00034695
101                       R=135 G=135 B= 95 #87875F &h5F8787 0x5F8787 06260615
102                       R=135 G=135 B=135 #878787 &h878787 0x878787 08882055
103                       R=135 G=135 B=175 #8787AF &hAF8787 0xAF8787 11503495
104                       R=135 G=135 B=215 #8787D7 &hD78787 0xD78787 14124935
105                       R=135 G=135 B=255 #8787FF &hFF8787 0xFF8787 16746375
106                       R=135 G=175 B=  0 #87AF00 &h00AF87 0x00AF87 00044935
107                       R=135 G=175 B= 95 #87AF5F &h5FAF87 0x5FAF87 06270855
108                       R=135 G=175 B=135 #87AF87 &h87AF87 0x87AF87 08892295
109                       R=135 G=175 B=175 #87AFAF &hAFAF87 0xAFAF87 11513735
110                       R=135 G=175 B=215 #87AFD7 &hD7AF87 0xD7AF87 14135175
111                       R=135 G=175 B=255 #87AFFF &hFFAF87 0xFFAF87 16756615
112                       R=135 G=215 B=  0 #87D700 &h00D787 0x00D787 00055175
113                       R=135 G=215 B= 95 #87D75F &h5FD787 0x5FD787 06281095
114                       R=135 G=215 B=135 #87D787 &h87D787 0x87D787 08902535
115                       R=135 G=215 B=175 #87D7AF &hAFD787 0xAFD787 11523975
116                       R=135 G=215 B=215 #87D7D7 &hD7D787 0xD7D787 14145415
117                       R=135 G=215 B=255 #87D7FF &hFFD787 0xFFD787 16766855
118                       R=135 G=255 B=  0 #87FF00 &h00FF87 0x00FF87 00065415
119                       R=135 G=255 B= 95 #87FF5F &h5FFF87 0x5FFF87 06291335
120                       R=135 G=255 B=135 #87FF87 &h87FF87 0x87FF87 08912775
121                       R=135 G=255 B=175 #87FFAF &hAFFF87 0xAFFF87 11534215
122                       R=135 G=255 B=215 #87FFD7 &hD7FF87 0xD7FF87 14155655
123                       R=135 G=255 B=255 #87FFFF &hFFFF87 0xFFFF87 16777095
124                       R=175 G=  0 B=  0 #AF0000 &h0000AF 0x0000AF 00000175
125                       R=175 G=  0 B= 95 #AF005F &h5F00AF 0x5F00AF 06226095
126                       R=175 G=  0 B=135 #AF0087 &h8700AF 0x8700AF 08847535
127                       R=175 G=  0 B=175 #AF00AF &hAF00AF 0xAF00AF 11468975
128                       R=175 G=  0 B=215 #AF00D7 &hD700AF 0xD700AF 14090415
129                       R=175 G=  0 B=255 #AF00FF &hFF00AF 0xFF00AF 16711855
130                       R=175 G= 95 B=  0 #AF5F00 &h005FAF 0x005FAF 00024495
131                       R=175 G= 95 B= 95 #AF5F5F &h5F5FAF 0x5F5FAF 06250415
132                       R=175 G= 95 B=135 #AF5F87 &h875FAF 0x875FAF 08871855
133                       R=175 G= 95 B=175 #AF5FAF &hAF5FAF 0xAF5FAF 11493295
134                       R=175 G= 95 B=215 #AF5FD7 &hD75FAF 0xD75FAF 14114735
135                       R=175 G= 95 B=255 #AF5FFF &hFF5FAF 0xFF5FAF 16736175
136                       R=175 G=135 B=  0 #AF8700 &h0087AF 0x0087AF 00034735
137                       R=175 G=135 B= 95 #AF875F &h5F87AF 0x5F87AF 06260655
138                       R=175 G=135 B=135 #AF8787 &h8787AF 0x8787AF 08882095
139                       R=175 G=135 B=175 #AF87AF &hAF87AF 0xAF87AF 11503535
140                       R=175 G=135 B=215 #AF87D7 &hD787AF 0xD787AF 14124975
141                       R=175 G=135 B=255 #AF87FF &hFF87AF 0xFF87AF 16746415
142                       R=175 G=175 B=  0 #AFAF00 &h00AFAF 0x00AFAF 00044975
143                       R=175 G=175 B= 95 #AFAF5F &h5FAFAF 0x5FAFAF 06270895
144                       R=175 G=175 B=135 #AFAF87 &h87AFAF 0x87AFAF 08892335
145                       R=175 G=175 B=175 #AFAFAF &hAFAFAF 0xAFAFAF 11513775
146                       R=175 G=175 B=215 #AFAFD7 &hD7AFAF 0xD7AFAF 14135215
147                       R=175 G=175 B=255 #AFAFFF &hFFAFAF 0xFFAFAF 16756655
148                       R=175 G=215 B=  0 #AFD700 &h00D7AF 0x00D7AF 00055215
149                       R=175 G=215 B= 95 #AFD75F &h5FD7AF 0x5FD7AF 06281135
150                       R=175 G=215 B=135 #AFD787 &h87D7AF 0x87D7AF 08902575
151                       R=175 G=215 B=175 #AFD7AF &hAFD7AF 0xAFD7AF 11524015
152                       R=175 G=215 B=215 #AFD7D7 &hD7D7AF 0xD7D7AF 14145455
153                       R=175 G=215 B=255 #AFD7FF &hFFD7AF 0xFFD7AF 16766895
154                       R=175 G=255 B=  0 #AFFF00 &h00FFAF 0x00FFAF 00065455
155                       R=175 G=255 B= 95 #AFFF5F &h5FFFAF 0x5FFFAF 06291375
156                       R=175 G=255 B=135 #AFFF87 &h87FFAF 0x87FFAF 08912815
157                       R=175 G=255 B=175 #AFFFAF &hAFFFAF 0xAFFFAF 11534255
158                       R=175 G=255 B=215 #AFFFD7 &hD7FFAF 0xD7FFAF 14155695
159                       R=175 G=255 B=255 #AFFFFF &hFFFFAF 0xFFFFAF 16777135
160                       R=215 G=  0 B=  0 #D70000 &h0000D7 0x0000D7 00000215
161                       R=215 G=  0 B= 95 #D7005F &h5F00D7 0x5F00D7 06226135
162                       R=215 G=  0 B=135 #D70087 &h8700D7 0x8700D7 08847575
163                       R=215 G=  0 B=175 #D700AF &hAF00D7 0xAF00D7 11469015
164                       R=215 G=  0 B=215 #D700D7 &hD700D7 0xD700D7 14090455
165                       R=215 G=  0 B=255 #D700FF &hFF00D7 0xFF00D7 16711895
166                       R=215 G= 95 B=  0 #D75F00 &h005FD7 0x005FD7 00024535
167                       R=215 G= 95 B= 95 #D75F5F &h5F5FD7 0x5F5FD7 06250455
168                       R=215 G= 95 B=135 #D75F87 &h875FD7 0x875FD7 08871895
169                       R=215 G= 95 B=175 #D75FAF &hAF5FD7 0xAF5FD7 11493335
170                       R=215 G= 95 B=215 #D75FD7 &hD75FD7 0xD75FD7 14114775
171                       R=215 G= 95 B=255 #D75FFF &hFF5FD7 0xFF5FD7 16736215
172                       R=215 G=135 B=  0 #D78700 &h0087D7 0x0087D7 00034775
173                       R=215 G=135 B= 95 #D7875F &h5F87D7 0x5F87D7 06260695
174                       R=215 G=135 B=135 #D78787 &h8787D7 0x8787D7 08882135
175                       R=215 G=135 B=175 #D787AF &hAF87D7 0xAF87D7 11503575
176                       R=215 G=135 B=215 #D787D7 &hD787D7 0xD787D7 14125015
177                       R=215 G=135 B=255 #D787FF &hFF87D7 0xFF87D7 16746455
178                       R=215 G=175 B=  0 #D7AF00 &h00AFD7 0x00AFD7 00045015
179                       R=215 G=175 B= 95 #D7AF5F &h5FAFD7 0x5FAFD7 06270935
180                       R=215 G=175 B=135 #D7AF87 &h87AFD7 0x87AFD7 08892375
181                       R=215 G=175 B=175 #D7AFAF &hAFAFD7 0xAFAFD7 11513815
182                       R=215 G=175 B=215 #D7AFD7 &hD7AFD7 0xD7AFD7 14135255
183                       R=215 G=175 B=255 #D7AFFF &hFFAFD7 0xFFAFD7 16756695
184                       R=215 G=215 B=  0 #D7D700 &h00D7D7 0x00D7D7 00055255
185                       R=215 G=215 B= 95 #D7D75F &h5FD7D7 0x5FD7D7 06281175
186                       R=215 G=215 B=135 #D7D787 &h87D7D7 0x87D7D7 08902615
187                       R=215 G=215 B=175 #D7D7AF &hAFD7D7 0xAFD7D7 11524055
188                       R=215 G=215 B=215 #D7D7D7 &hD7D7D7 0xD7D7D7 14145495
189                       R=215 G=215 B=255 #D7D7FF &hFFD7D7 0xFFD7D7 16766935
190                       R=215 G=255 B=  0 #D7FF00 &h00FFD7 0x00FFD7 00065495
191                       R=215 G=255 B= 95 #D7FF5F &h5FFFD7 0x5FFFD7 06291415
192                       R=215 G=255 B=135 #D7FF87 &h87FFD7 0x87FFD7 08912855
193                       R=215 G=255 B=175 #D7FFAF &hAFFFD7 0xAFFFD7 11534295
194                       R=215 G=255 B=215 #D7FFD7 &hD7FFD7 0xD7FFD7 14155735
195                       R=215 G=255 B=255 #D7FFFF &hFFFFD7 0xFFFFD7 16777175
196 (red)                 R=255 G=  0 B=  0 #FF0000 &h0000FF 0x0000FF 00000255
197                       R=255 G=  0 B= 95 #FF005F &h5F00FF 0x5F00FF 06226175
198                       R=255 G=  0 B=135 #FF0087 &h8700FF 0x8700FF 08847615
199                       R=255 G=  0 B=175 #FF00AF &hAF00FF 0xAF00FF 11469055
200                       R=255 G=  0 B=215 #FF00D7 &hD700FF 0xD700FF 14090495
201 (magenta, fuchsia)    R=255 G=  0 B=255 #FF00FF &hFF00FF 0xFF00FF 16711935
202                       R=255 G= 95 B=  0 #FF5F00 &h005FFF 0x005FFF 00024575
203                       R=255 G= 95 B= 95 #FF5F5F &h5F5FFF 0x5F5FFF 06250495
204                       R=255 G= 95 B=135 #FF5F87 &h875FFF 0x875FFF 08871935
205                       R=255 G= 95 B=175 #FF5FAF &hAF5FFF 0xAF5FFF 11493375
206                       R=255 G= 95 B=215 #FF5FD7 &hD75FFF 0xD75FFF 14114815
207                       R=255 G= 95 B=255 #FF5FFF &hFF5FFF 0xFF5FFF 16736255
208                       R=255 G=135 B=  0 #FF8700 &h0087FF 0x0087FF 00034815
209                       R=255 G=135 B= 95 #FF875F &h5F87FF 0x5F87FF 06260735
210                       R=255 G=135 B=135 #FF8787 &h8787FF 0x8787FF 08882175
211                       R=255 G=135 B=175 #FF87AF &hAF87FF 0xAF87FF 11503615
212                       R=255 G=135 B=215 #FF87D7 &hD787FF 0xD787FF 14125055
213                       R=255 G=135 B=255 #FF87FF &hFF87FF 0xFF87FF 16746495
214                       R=255 G=175 B=  0 #FFAF00 &h00AFFF 0x00AFFF 00045055
215                       R=255 G=175 B= 95 #FFAF5F &h5FAFFF 0x5FAFFF 06270975
216                       R=255 G=175 B=135 #FFAF87 &h87AFFF 0x87AFFF 08892415
217                       R=255 G=175 B=175 #FFAFAF &hAFAFFF 0xAFAFFF 11513855
218                       R=255 G=175 B=215 #FFAFD7 &hD7AFFF 0xD7AFFF 14135295
219                       R=255 G=175 B=255 #FFAFFF &hFFAFFF 0xFFAFFF 16756735
220 (gold)                R=255 G=215 B=  0 #FFD700 &h00D7FF 0x00D7FF 00055295
221                       R=255 G=215 B= 95 #FFD75F &h5FD7FF 0x5FD7FF 06281215
222                       R=255 G=215 B=135 #FFD787 &h87D7FF 0x87D7FF 08902655
223                       R=255 G=215 B=175 #FFD7AF &hAFD7FF 0xAFD7FF 11524095
224                       R=255 G=215 B=215 #FFD7D7 &hD7D7FF 0xD7D7FF 14145535
225                       R=255 G=215 B=255 #FFD7FF &hFFD7FF 0xFFD7FF 16766975
226 (yellow)              R=255 G=255 B=  0 #FFFF00 &h00FFFF 0x00FFFF 00065535
227                       R=255 G=255 B= 95 #FFFF5F &h5FFFFF 0x5FFFFF 06291455
228                       R=255 G=255 B=135 #FFFF87 &h87FFFF 0x87FFFF 08912895
229                       R=255 G=255 B=175 #FFFFAF &hAFFFFF 0xAFFFFF 11534335
230                       R=255 G=255 B=215 #FFFFD7 &hD7FFFF 0xD7FFFF 14155775
231 (white)               R=255 G=255 B=255 #FFFFFF &hFFFFFF 0xFFFFFF 16777215
232                       R=  8 G=  8 B=  8 #080808 &h080808 0x080808 00526344
233                       R= 18 G= 18 B= 18 #121212 &h121212 0x121212 01184274
234                       R= 28 G= 28 B= 28 #1C1C1C &h1C1C1C 0x1C1C1C 01842204
235                       R= 38 G= 38 B= 38 #262626 &h262626 0x262626 02500134
236                       R= 48 G= 48 B= 48 #303030 &h303030 0x303030 03158064
237                       R= 58 G= 58 B= 58 #3A3A3A &h3A3A3A 0x3A3A3A 03815994
238                       R= 68 G= 68 B= 68 #444444 &h444444 0x444444 04473924
239                       R= 78 G= 78 B= 78 #4E4E4E &h4E4E4E 0x4E4E4E 05131854
240                       R= 88 G= 88 B= 88 #585858 &h585858 0x585858 05789784
241                       R= 98 G= 98 B= 98 #626262 &h626262 0x626262 06447714
242                       R=108 G=108 B=108 #6C6C6C &h6C6C6C 0x6C6C6C 07105644
243                       R=118 G=118 B=118 #767676 &h767676 0x767676 07763574
244 (gray)                R=128 G=128 B=128 #808080 &h808080 0x808080 08421504
245                       R=138 G=138 B=138 #8A8A8A &h8A8A8A 0x8A8A8A 09079434
246                       R=148 G=148 B=148 #949494 &h949494 0x949494 09737364
247                       R=158 G=158 B=158 #9E9E9E &h9E9E9E 0x9E9E9E 10395294
248                       R=168 G=168 B=168 #A8A8A8 &hA8A8A8 0xA8A8A8 11053224
249                       R=178 G=178 B=178 #B2B2B2 &hB2B2B2 0xB2B2B2 11711154
250                       R=188 G=188 B=188 #BCBCBC &hBCBCBC 0xBCBCBC 12369084
251                       R=198 G=198 B=198 #C6C6C6 &hC6C6C6 0xC6C6C6 13027014
252                       R=208 G=208 B=208 #D0D0D0 &hD0D0D0 0xD0D0D0 13684944
253                       R=218 G=218 B=218 #DADADA &hDADADA 0xDADADA 14342874
254                       R=228 G=228 B=228 #E4E4E4 &hE4E4E4 0xE4E4E4 15000804
255                       R=238 G=238 B=238 #EEEEEE &hEEEEEE 0xEEEEEE 15658734


You can view these colours in the client by doing this Immediate scripting instruction (Ctrl+I):


Debug "colours256"





The code to generate the Xterm cube is:


void Generate256colours (void)
  {
  int red, green, blue;
  const BYTE values [6] = { 
      0, 
     95, 
     95 + 40, 
     95 + 40 + 40, 
     95 + 40 + 40 + 40, 
     95 + 40 + 40 + 40 + 40
      };

  xterm_256_colours   [0] = RGB (0, 0, 0);         // (black)       
  xterm_256_colours   [1] = RGB (128, 0, 0);       // (maroon)      
  xterm_256_colours   [2] = RGB (0, 128, 0);       // (green)       
  xterm_256_colours   [3] = RGB (128, 128, 0);     // (olive)       
  xterm_256_colours   [4] = RGB (0, 0, 128);       // (navy)        
  xterm_256_colours   [5] = RGB (128, 0, 128);     // (purple)      
  xterm_256_colours   [6] = RGB (0, 128, 128);     // (teal)        
  xterm_256_colours   [7] = RGB (192, 192, 192);   // (silver)      
                       
  xterm_256_colours   [8]  = RGB (128, 128, 128);  // (gray)                 
  xterm_256_colours   [9]  = RGB (255, 0, 0);      // (red)               
  xterm_256_colours   [10] = RGB (0, 255, 0);      // (lime)              
  xterm_256_colours   [11] = RGB (255, 255, 0);    // (yellow)            
  xterm_256_colours   [12] = RGB (0, 0, 255);      // (blue)              
  xterm_256_colours   [13] = RGB (255, 0, 255);    // (magenta)  
  xterm_256_colours   [14] = RGB (0, 255, 255);    // (cyan)        
  xterm_256_colours   [15] = RGB (255, 255, 255);  // (white)             

  for (red = 0; red < 6; red++)
    for (green = 0; green < 6; green++)
      for (blue = 0; blue < 6; blue++)
         xterm_256_colours [16 + (red * 36) + (green * 6) + blue] =
            RGB (values [red], values [green], values [blue]);

  int grey;
  for (grey = 0; grey < 24; grey++)
    {
    BYTE value = 8 + (grey * 10);
    xterm_256_colours [232 + grey] = RGB (value, value, value);
    }

  } // end of Generate256colours


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #48 on Sun 19 Oct 2014 12:47 AM (UTC)

Amended on Sun 19 Oct 2014 02:25 AM (UTC) by Nick Gammon

Message
Swatches from the new colour cube:




Lua code to generate the above:


values = { 0, 
     95, 
     95 + 40, 
     95 + 40 + 40, 
     95 + 40 + 40 + 40, 
     95 + 40 + 40 + 40 + 40
      };

  which = 16
  
  print (string.rep ("-", 80))
  print""
  
  for red = 0, 5 do
    for green = 0, 5 do
      for blue = 0, 5 do
      
      Tell (string.format (" %3i: ", which))
      ColourTell ("", 
                  RGBColourToName (values [red + 1] + 
                                   values [green + 1] * 256 + 
                                   values [blue + 1] * 65536),  
                                   "    ")
      which = which + 1
      end -- of for each blue
      
    print ""
    end -- of for each green
    
    print ""
  end  -- of for each read
  
  -- grayscale stuff
  
  gray = 8
  
  for line = 1, 4 do
    for col = 1, 6 do
    
     Tell (string.format (" %3i: ", which))
      ColourTell ("", 
                  RGBColourToName (gray + 
                                   gray * 256 + 
                                   gray * 65536),  
                                   "    ")
      which = which + 1
      gray = gray + 10
    end -- for each line
    print ""
  end -- for each col
  
print ""






Swatches with hex codes:



Lua code to generate the above:


values = { 0, 
     95, 
     95 + 40, 
     95 + 40 + 40, 
     95 + 40 + 40 + 40, 
     95 + 40 + 40 + 40 + 40
      };

  which = 16
  
  print (string.rep ("-", 80))
  print""
  
  for red = 0, 5 do
    for green = 0, 5 do
      for blue = 0, 5 do
      colour = values [red + 1] + 
               values [green + 1] * 256 + 
               values [blue + 1] * 65536
      textcolour = "white"
      if values [red + 1] + values [green + 1] + values [blue + 1] > (128 * 3) then
         textcolour = "black"
      end -- if
      ColourTell (textcolour, RGBColourToName (colour), 
                  string.format (" %3i: %02X%02X%02X ", 
                  which, values [red + 1], values [green + 1], values [blue + 1] ))
      Tell " "
      which = which + 1
      end -- of for each blue
      
    print ""
    end -- of for each green
    
    print ""
  end  -- of for each read
  
  -- grayscale stuff
  
  gray = 8
  
  for line = 1, 4 do
    for col = 1, 6 do
    
     colour = gray + 
              gray * 256 + 
              gray * 65536

      textcolour = "white"
      if gray  > 128 then
         textcolour = "black"
      end -- if
      ColourTell (textcolour, RGBColourToName (colour), string.format (" %3i: %06X ", which, colour))
      Tell " "
      which = which + 1
      gray = gray + 10
    end -- for each line
    print ""
  end -- for each col
  
print ""






By way of comparison, here are the "official" colour names used by the client, sorted into "sort of" colour order:



Lua code to generate the above:


  print ""

  t = {}
  for k, v in pairs (colour_names) do
    table.insert (t, k)
  end -- for

  table.sort (t, function (a, b)
           col1 = colour_names [a]
           col2 = colour_names [b]
           r1 = bit.band (col1, 0xFF)
           r2 = bit.band (col2, 0xFF)
           -- slight adjustment so identical colours sort together
           g1 = bit.band (bit.shr (col1, 8), 0xFF) * 1.001
           g2 = bit.band (bit.shr (col2, 8), 0xFF) * 1.001
           b1 = bit.band (bit.shr (col1, 16), 0xFF) * 1.002
           b2 = bit.band (bit.shr (col2, 16), 0xFF) *  1.002

           return r1 + g1 + b1 < r2 + g2 + b2

           end -- function
        )

  which = 0

  print ""

 function showcolour (name)
     colour = colour_names [name]
      r = bit.band (colour, 0xFF)
      g = bit.band (bit.shr (colour, 8), 0xFF)
      b = bit.band (bit.shr (colour, 16), 0xFF)
 
      textcolour = "white"
      if r + g + b > (128 * 3) then
         textcolour = "black"
      end -- if
      ColourTell (textcolour, RGBColourToName (colour), 
                  string.format (" %-20s: %02X%02X%02X ", name, r, g, b ))
      Tell "  "

      which = which + 1
 end -- showcolour

 for i = 1, #t / 3 do
   showcolour (t [i])
   showcolour (t [i + #t / 3 ])
   showcolour (t [i + (#t / 3) * 2])
   print ""

 end -- for

 print ""





And now the "official" colour names used by the client, sorted into alphabetical order:



Lua code to generate the above:


  print ""

  t = {}
  for k, v in pairs (colour_names) do
    table.insert (t, k)
  end -- for

  table.sort (t, function (a, b) return a < b end)

 function showcolour (name)
     colour = colour_names [name]
      r = bit.band (colour, 0xFF)
      g = bit.band (bit.shr (colour, 8), 0xFF)
      b = bit.band (bit.shr (colour, 16), 0xFF)
 
      textcolour = "white"
      if r + g + b > (128 * 3) then
         textcolour = "black"
      end -- if
      ColourTell (textcolour, RGBColourToName (colour), 
                  string.format (" %-20s: %02X%02X%02X ", name, r, g, b ))
      Tell "  "
 end -- showcolour

 for i = 1, #t / 3 do
   showcolour (t [i])
   showcolour (t [i + #t / 3 ])
   showcolour (t [i + (#t / 3) * 2])
   print ""

 end -- for

 print ""

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


159,137 views.

This is page 4, subject is 4 pages long:  [Previous page]  1  2  3  4 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.