et colors as html hex

Any discussions that are non-rtcw/et related go here.

Moderators: Forum moderators, developers

User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

et colors as html hex

Post by ouroboro »

all color codes specified in et src (others just repeat these) & html hex equivs (err close enough):

Code: Select all

^0 = #000000
^1 = #FF0000
^2 = #00FF00
^3 = #FFFF00
^4 = #0000FF
^5 = #00FFFF
^6 = #FF00FF
^7 = #FFFFFF
^8 = #FF8000
^9 = #808080
^: = #BFBFBF
^< = #008000
^= = #808000
^> = #000080
^? = #800000
^@ = #804000
^A = #FF991A
^B = #008080
^C = #800080
^D = #0080FF
^E = #8000FF
^F = #3399CC
^G = #CCFFCC
^H = #006633
^I = #FF0033
^J = #B31A1A
^K = #993300
^L = #CC9933
^M = #999933
^N = #FFFFBF
^O = #FFFF80
rgba -> rgb -> hex (ex: 1.0, 0.6f, 0.1f, 1.0 -> 255, 153, 26 -> #FF991A):

Image
0123456789:<=>?@ABCDEFGHIJKLMNO

:crazy: stfu this is for my own interest!
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

remember, there's a character limit (including color codes) for names
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
RoadKillPuppy
Posts: 207
Joined: Thu Apr 08, 2004 9:21 am
Location: Belgium!
Contact:

Post by RoadKillPuppy »

I messed around with the systats source to handle the extended chars as well and ended up with these:

Code: Select all

   
        vecColors.push_back&#40; "#71431F" &#41;;       // SPACE
        vecColors.push_back&#40; "#B3916E" &#41;;       // !
        vecColors.push_back&#40; "#286D72" &#41;;       // "
        vecColors.push_back&#40; "#701071" &#41;;       // #
        vecColors.push_back&#40; "#3484D9" &#41;;       // $
        vecColors.push_back&#40; "#6B32A3" &#41;;       // %
        vecColors.push_back&#40; "#5A8CA5" &#41;;       // &
        vecColors.push_back&#40; "#C9D6CD" &#41;;       // '
        vecColors.push_back&#40; "#31604C" &#41;;       // &#40;
        vecColors.push_back&#40; "#C73854" &#41;;       // &#41;
        vecColors.push_back&#40; "#F8F8F8" &#41;;       // *
        vecColors.push_back&#40; "#873819" &#41;;       // +
        vecColors.push_back&#40; "#B29E69" &#41;;       // ,
        vecColors.push_back&#40; "#8D8F6A" &#41;;       // -
        vecColors.push_back&#40; "#F7FFDF" &#41;;       // .
        vecColors.push_back&#40; "#E6F2AA" &#41;;       // /
        vecColors.push_back&#40; "#000000" &#41;;       // 0
        vecColors.push_back&#40; "#CA171D" &#41;;       // 1
        vecColors.push_back&#40; "#25E629" &#41;;       // 2
        vecColors.push_back&#40; "#F1F848" &#41;;       // 3
        vecColors.push_back&#40; "#3033B8" &#41;;       // 4
        vecColors.push_back&#40; "#3EE7E2" &#41;;       // 5
        vecColors.push_back&#40; "#D425D8" &#41;;       // 6
        vecColors.push_back&#40; "#FFFDF2" &#41;;       // 7
        vecColors.push_back&#40; "#EA8126" &#41;;       // 8
        vecColors.push_back&#40; "#818085" &#41;;       // 9
        vecColors.push_back&#40; "#C1C2C7" &#41;;       // &#58;
        vecColors.push_back&#40; "#BEB6C1" &#41;;       // ;
        vecColors.push_back&#40; "#34673E" &#41;;       // <
        vecColors.push_back&#40; "#7B7C40" &#41;;       // =
        vecColors.push_back&#40; "#120D61" &#41;;       // >
        vecColors.push_back&#40; "#5B0812" &#41;;       // ?
        vecColors.push_back&#40; "#623307" &#41;;       // @
        vecColors.push_back&#40; "#EB9F53" &#41;;       // A
        vecColors.push_back&#40; "#106F59" &#41;;       // B
        vecColors.push_back&#40; "#5A134F" &#41;;       // C
        vecColors.push_back&#40; "#035AFF" &#41;;       // D
        vecColors.push_back&#40; "#681EA7" &#41;;       // E
        vecColors.push_back&#40; "#5097C1" &#41;;       // F
        vecColors.push_back&#40; "#BEDAC4" &#41;;       // G
        vecColors.push_back&#40; "#024D2C" &#41;;       // H
        vecColors.push_back&#40; "#7D081B" &#41;;       // I
        vecColors.push_back&#40; "#90243E" &#41;;       // J
        vecColors.push_back&#40; "#743313" &#41;;       // K
        vecColors.push_back&#40; "#A7905E" &#41;;       // L
        vecColors.push_back&#40; "#555C26" &#41;;       // M
        vecColors.push_back&#40; "#AEAC97" &#41;;       // N
        vecColors.push_back&#40; "#C0BF7F" &#41;;       // O
        vecColors.push_back&#40; "#000000" &#41;;       // P
        vecColors.push_back&#40; "#DA0120" &#41;;       // Q
        vecColors.push_back&#40; "#00B906" &#41;;       // R
        vecColors.push_back&#40; "#E8FF19" &#41;;       // S
        vecColors.push_back&#40; "#170BDB" &#41;;       // T
        vecColors.push_back&#40; "#23C2C6" &#41;;       // U
        vecColors.push_back&#40; "#E201DB" &#41;;       // V
        vecColors.push_back&#40; "#FFFFFF" &#41;;       // W
        vecColors.push_back&#40; "#CA7C27" &#41;;       // X
        vecColors.push_back&#40; "#757575" &#41;;       // Y
        vecColors.push_back&#40; "#CC8034" &#41;;       // Z
        vecColors.push_back&#40; "#CC8034" &#41;;       // &#91;
        vecColors.push_back&#40; "#34673E" &#41;;       // \
        vecColors.push_back&#40; "#7B7C40" &#41;;       // &#93;
        vecColors.push_back&#40; "" &#41;;              // ^
        vecColors.push_back&#40; "#5B0812" &#41;;       // _
        vecColors.push_back&#40; "#170BDB" &#41;;       // ´
        vecColors.push_back&#40; "#EB9F53" &#41;;       // a
        vecColors.push_back&#40; "#106F59" &#41;;       // b
        vecColors.push_back&#40; "#5A134F" &#41;;       // c
        vecColors.push_back&#40; "#035AFF" &#41;;       // d
        vecColors.push_back&#40; "#681EA7" &#41;;       // e
        vecColors.push_back&#40; "#5097C1" &#41;;       // f
        vecColors.push_back&#40; "#BEDAC4" &#41;;       // g
        vecColors.push_back&#40; "#024D2C" &#41;;       // h
        vecColors.push_back&#40; "#7D081B" &#41;;       // i
        vecColors.push_back&#40; "#90243E" &#41;;       // j
        vecColors.push_back&#40; "#743313" &#41;;       // k
        vecColors.push_back&#40; "#A7905E" &#41;;       // l
        vecColors.push_back&#40; "#555C26" &#41;;       // m
        vecColors.push_back&#40; "#AEAC97" &#41;;       // n
        vecColors.push_back&#40; "#C0BF7F" &#41;;       // o
        vecColors.push_back&#40; "#000000" &#41;;       // p
        vecColors.push_back&#40; "#DA0120" &#41;;       // q
        vecColors.push_back&#40; "#00B906" &#41;;       // r
        vecColors.push_back&#40; "#E8FF19" &#41;;       // s
        vecColors.push_back&#40; "#170BDB" &#41;;       // t
        vecColors.push_back&#40; "#23C2C6" &#41;;       // u
        vecColors.push_back&#40; "#E201DB" &#41;;       // v
        vecColors.push_back&#40; "#FFFFFF" &#41;;       // w
        vecColors.push_back&#40; "#CA7C27" &#41;;       // x
        vecColors.push_back&#40; "#757575" &#41;;       // y
        vecColors.push_back&#40; "#CC8034" &#41;;       // z
Not 100% correct, but close enough to me...
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

fyi i got the rgba info from q_math.c:

Code: Select all

vec4_t	g_color_table&#91;32&#93; =
	&#123;
		&#123; 0.0,	0.0,	0.0,	1.0 &#125;,	// 0 - black		0
		&#123; 1.0,	0.0,	0.0,	1.0 &#125;,	// 1 - red			1
		&#123; 0.0,	1.0,	0.0,	1.0 &#125;,	// 2 - green		2
		&#123; 1.0,	1.0,	0.0,	1.0 &#125;,	// 3 - yellow		3
		&#123; 0.0,	0.0,	1.0,	1.0 &#125;,	// 4 - blue			4
		&#123; 0.0,	1.0,	1.0,	1.0 &#125;,	// 5 - cyan			5
		&#123; 1.0,	0.0,	1.0,	1.0 &#125;,	// 6 - purple		6
		&#123; 1.0,	1.0,	1.0,	1.0 &#125;,	// 7 - white		7
		&#123; 1.0,	0.5,	0.0,	1.0 &#125;,	// 8 - orange		8
		&#123; 0.5,	0.5,	0.5,	1.0 &#125;,	// 9 - md.grey		9
		&#123; 0.75,	0.75,	0.75,	1.0 &#125;,	// &#58; - lt.grey		10		// lt grey for names
		&#123; 0.75, 0.75,	0.75,	1.0 &#125;,	// ; - lt.grey		11
		&#123; 0.0,	0.5,	0.0,	1.0 &#125;,	// < - md.green		12
		&#123; 0.5,	0.5,	0.0,	1.0 &#125;,	// = - md.yellow	13
		&#123; 0.0,	0.0,	0.5,	1.0 &#125;,	// > - md.blue		14
		&#123; 0.5,	0.0,	0.0,	1.0 &#125;,	// ? - md.red		15
		&#123; 0.5,	0.25,	0.0,	1.0 &#125;,	// @ - md.orange	16
		&#123; 1.0,	0.6f,	0.1f,	1.0 &#125;,	// A - lt.orange	17
		&#123; 0.0,	0.5,	0.5,	1.0 &#125;,	// B - md.cyan		18
		&#123; 0.5,	0.0,	0.5,	1.0 &#125;,	// C - md.purple	19
		&#123; 0.0,	0.5,	1.0,	1.0 &#125;,	// D				20
		&#123; 0.5,	0.0,	1.0,	1.0 &#125;,	// E				21
		&#123; 0.2f,	0.6f,	0.8f,	1.0 &#125;,	// F				22
		&#123; 0.8f,	1.0,	0.8f,	1.0 &#125;,	// G				23
		&#123; 0.0,	0.4,	0.2f,	1.0 &#125;,	// H				24
		&#123; 1.0,	0.0,	0.2f,	1.0 &#125;,	// I				25
		&#123; 0.7f,	0.1f,	0.1f,	1.0 &#125;,	// J				26
		&#123; 0.6f,	0.2f,	0.0,	1.0 &#125;,	// K				27
		&#123; 0.8f,	0.6f,	0.2f,	1.0 &#125;,	// L				28
		&#123; 0.6f,	0.6f,	0.2f,	1.0 &#125;,	// M				29
		&#123; 1.0,	1.0,	0.75,	1.0 &#125;,	// N				30
		&#123; 1.0,	1.0,	0.5,	1.0 &#125;,	// O				31
	&#125;;
there's also some stuff in q_shared.h but it adds nothing to the above colors.

with that info you can get the (more or less) exact hex codes, which work out to what i posted above. for example ^1 = 1, 0, 0 which = 255, 0, 0 = #ff0000 (pure red). you have #CA171D, which it may look like on screen depending how your monitor looks, but the game is actually intending #ff0000. i was just curious about this so i posted it here mostly so i would have it saved someplace :P
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

ouroboro wrote:have it saved someplace :P
that's what i thought, before the crash (lost a pm telling me some info)
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

but bani put the forums on an opteron now!!! \o/
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

hrm i made a complete list if anyone needs it: http://www.sitesled.com/members/ouroboro/et2hex.html
User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

Post by Deus »

ouroboro wrote:hrm i made a complete list if anyone needs it: http://www.sitesled.com/members/ouroboro/et2hex.html
This differs from http://wolfwiki.anime.net/index.php/Color_Codes
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

wolfwiki must be wrong. they probably used an eyedropper to get the hex values. i got them from the source code. i'd edit that info but i've never felt comfortable editing people's stuff on wiki's aside from minor spelling or whatever. i don't want to offend anyone. feel free to do so though if you trust my info. you could check yourself but you'd come to the same values as mine.
User avatar
zinx
Posts: 267
Joined: Fri Jan 16, 2004 12:37 pm
Location: US
Contact:

Post by zinx »

(byte)(0.5 * 255) = 127
Zinx Verituse http://zinx.xmms.org/
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

i'd call that 128, since .5 rounds up.
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

integers round down... even .9
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
ouroboro
Posts: 662
Joined: Mon Jul 26, 2004 6:52 pm

Post by ouroboro »

< .5 rounds down. >= .5 rounds up. every elementary school kid knows that.
User avatar
RoadKillPuppy
Posts: 207
Joined: Thu Apr 08, 2004 9:21 am
Location: Belgium!
Contact:

Post by RoadKillPuppy »

kids don't do integers
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

ANY computer casting (to an int type number, eg non floating point) rounds down... EVERY computer programmer knows that
AND the rules are, .5 rounds to the even number... eg:
7.5 => 8
6.5 => 6
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
Post Reply