Palette file stupid question

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
Post Reply
User avatar
JimmyJack
Trained
Trained
Posts: 92
Joined: 06 May 2017, 05:50

Palette file stupid question

Post by JimmyJack » 13 Sep 2018, 08:04

I don't get the format for the colors. I mean xx,xx,xx,ff. Paint and Gimp both do not use this numbering system. I have tried changing numbers randomly and can't find a pattern that will let me "fine tune" the shade or color.

So anyway how do I find the color that I am looking for in that format? There has got to be a program or a "how to" written on it some where. I just can't find it.
Bring back the cool! The Rman-Jack VTOL builder.
Transmission ends ...

User avatar
Berg
Regular
Regular
Posts: 2024
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Palette file stupid question

Post by Berg » 13 Sep 2018, 12:09

So anyway how do I find the color that I am looking for in that format? There has got to be a program or a "how to" written on it some where. I just can't find it
The format is RBGA red blue green alpha
The easy way is to remove the FF at the end and try the first 3 numbers as its RBG

Code: Select all

1,1,1,ff	// black
ff,ff,ff,ff	// white
1,1,1,ff	// reload background
ff,ff,ff,ff	// reload bar
0,ff,0,ff	// health high
ff,ff,0,ff	// health medium
ff,0,0,ff	// health low
0,ff,0,ff	// green
ff,0,0,ff	// red
ff,ff,0,ff	// yellow
0,1,61,ff	// menu background
0,15,f0,ff	// menu border
85,1,1,ff	// menu load border
ff,ff,ff,ff	// cursor
1,1,21,ff	// menu scores interior
64,64,a0,ff	// menu separator
ff,ff,ff,ff	// text bright
a0,a0,ff,ff	// text medium
60,60,ff,ff	// text dark
1,1,1,ff	// score box border
so the first one entered in gimp will be 010101 or #010101 depending on the format required basicly remove the ff from the end.

Good lucks there sunshine

Cyp
Evitcani
Evitcani
Posts: 711
Joined: 17 Jan 2010, 23:35

Re: Palette file stupid question

Post by Cyp » 13 Sep 2018, 13:24

Berg wrote:
13 Sep 2018, 12:09
The format is RBGA red blue green alpha
The easy way is to remove the FF at the end and try the first 3 numbers as its RBG
I think you mean RGBA (red, green, blue, alpha).
0,ff,0,ff // green

User avatar
Berg
Regular
Regular
Posts: 2024
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Palette file stupid question

Post by Berg » 13 Sep 2018, 13:42

Cyp wrote:
13 Sep 2018, 13:24
I think you mean RGBA (red, green, blue, alpha).
Yes I did mental brain fart thanks Cyp

Forgon
Code contributor
Code contributor
Posts: 136
Joined: 07 Dec 2016, 22:23

Re: Palette file stupid question

Post by Forgon » 13 Sep 2018, 19:23

JimmyJack wrote:I don't get the format for the colors. I mean xx,xx,xx,ff. Paint and Gimp both do not use this numbering system.
I have tried changing numbers randomly and can't find a pattern that will let me "fine tune" the shade or color.
The palette file './data/base/palette.txt' uses an RGBA color model, with the channels:
  • Red light
  • Green light
  • Blue light
  • Alpha, which denotes opacity.
Their values are written in hexadecimal notation, which represents the numbers 10-15 with the letters A-F, in addition to 0-9.
They can range from 0 to 255, so that FF is the largest possible value.
As you can see, most colors use the maximum amount of opacity, i.e. they are non-transparent.
JimmyJack wrote:So anyway how do I find the color that I am looking for in that format? There has got to be a program or a "how to" written on it some where. I just can't find it.
You did not tell us what exactly what you are trying to achieve (remember asking smart questions). Thus I must guess.

You can look up player colors at the Warzone Atlassian website, if that is what you want.

If no colors to be changed are transparent, you could ignore their alpha channel and use GIMP:
The "FG/BG Colour" dialog contains a button labeled "Scales".
Click on it, select the button labeled "0..255" and pick a color by dragging sliders for the RGB channels.
Its hexadecimal value is printed in a box below the sliders:
gimp_rgb_picking.png
GIMP window showing how to pick an RGB color
Alternatively, you could use one of the countless color tools for web developers that are freely available online (e.g. "HTML CSS Color Picker").

If you need to work with transparent colors, using GIMP is more complicated.
Opacity can only be added to a color by adding an alpha channel, which requires an extra layer if you want to see more than one color at a time. The easiest way is to:
  • press "R" (for the "Rectangle Select Tool")
  • select an area by dragging the mouse
  • press "Ctrl-C" (to copy it)
  • press "Ctrl-V" (to paste it)
  • and press "Ctrl-Shift-N" (to create the layer).
Afterwards, you can alter the opacity value with a precision of 1/1000 using a slider:
gimp_alpha_channel.png
GIMP window showing how to add transparency to an RGB color
Much easier is to use a website like MDN's "color picker tool".
Note that this provides you with an opacity precision of only 1/100.
Attachments
gimp_alpha_channel.png
GIMP window showing how to add transparency to an RGB color

User avatar
JimmyJack
Trained
Trained
Posts: 92
Joined: 06 May 2017, 05:50

Re: Palette file stupid question

Post by JimmyJack » 14 Sep 2018, 10:26

Thanks guys. Lots of help. Looks like it may not be as hard as I first thought.
Forgon wrote:
13 Sep 2018, 19:23
JimmyJack wrote:So anyway how do I find the color that I am looking for in that format? There has got to be a program or a "how to" written on it some where. I just can't find it.
You did not tell us what exactly what you are trying to achieve (remember asking smart questions). Thus I must guess.

:stressed:
Sorry about that. I meant, "pick a color, any color" and then find the numerical representation of that color.

But with all the links you posted it looks like I can just play with it until the color finds me.

I am all teeth here! :D Thanks again.
Bring back the cool! The Rman-Jack VTOL builder.
Transmission ends ...

Post Reply