1

Topic: Colors

Can somone please list the hex code colors of what colors are allowed in teeworlds..

Like
0x2bff00 is yellow..

But you cant have black, Because in trunk client you cant see it.

Thanks.

2

Re: Colors

It is like that so people cant do lame solid black colors and annoy other players.

-SALAD

3

Re: Colors

Flamin, if you want to know the hexa code of colors, just open your Paint, click on Create custom colors or I don't know how they called it, they give you the hexa code when you select a color.

Not Luck, Just Magic.

4

Re: Colors

TEEWORLDS COLOR is an Integer number that resume a vec4 [0-255 value] (red, green, blu, alpha), but is stupid question, because are allowed (simply) the colors that you can set when choose a custom color for your tee skin!
to know the integer value of your actual custom color, open setting.cfg and look (player_color_body 5451463 and player_color_feet 854542 only example) or get value from local console F1

5

Re: Colors

@DALAS/SALAD not what im talking about smile

@Dune I know. Im saying... What colors are blocked? And when I do that, The colors look faded.

@CarmineZ i already know this, Im talking about server-side. ( witch uses hex)

Like for example:

0x020e6a
should be a darker blue color, But it comes out nearly white.

doublepost merged //Landil

6

Re: Colors

flamin, Teeworlds is not using the hexadecimal notation for the colors. Just check the player_color command.

Not Luck, Just Magic.

7

Re: Colors

Is there a program too change hex colors too teeworlds colors?

8

Re: Colors

flamin wrote:

Is there a program too change hex colors too teeworlds colors?

Nope. Teeworlds is sometimes using RGB, sometimes HSL, I don't know what is used for the player color command.

If you're looking for some code to convert from RGB to HSL, spl0k did a nice work there:

static vec3 rgb_to_hsl(vec3 rgb)
{
    float r = rgb.r;
    float g = rgb.g;
    float b = rgb.b;

    float vMin = min(min(r, g), b);
    float vMax = max(max(r, g), b);
    float dMax = vMax - vMin;

    float h;
    float s;
    float l = (vMax + vMin) / 2.0f;

    if(dMax == 0.0f)
    {
        h = 0.0f;
        s = 0.0f;
    }
    else
    {
        if(l < 0.5f)
            s = dMax / (vMax + vMin);
        else
            s = dMax / (2 - vMax - vMin);

        float dR = (((vMax - r) / 6.0f) + (dMax / 2.0f)) / dMax;
        float dG = (((vMax - g) / 6.0f) + (dMax / 2.0f)) / dMax;
        float dB = (((vMax - b) / 6.0f) + (dMax / 2.0f)) / dMax;

        if(r == vMax)
            h = dB - dG;
        else if(g == vMax)
            h = (1.0f/3.0f) + dR - dB;
        else if(b == vMax)
            h = (2.0f/3.0f) + dG - dR;

        if(h < 0.0f)
            h += 1.0f;
        if(h > 1.0f)
            h -= 1.0f;
    }

    return vec3(h*360, s, l);
}
Not Luck, Just Magic.