Page 2 of 7

Re: Color palette

PostPosted: 22 Jul 2014, 11:16
by Freddy
The thing is... the palettes you attached as an example don't contain the wine or purple-black colors that were suggested. I would be more than happy to make a balanced palette if only I was given some pointers how to test the colors in the game. Also, I would suggest some small adjustments to the multiplayer colors (are they taken from the pallete too?), for example the black I was talking about.

Re: Color palette

PostPosted: 22 Jul 2014, 14:02
by Krom
That was an example ;-)
Of course we are open to other palettes.

I'm not sure there's an easy way to test the colors in game though :(
IIRC Remake reads palette from pal_0 file, so if you could edit it with a hex tool or Graphics Reader (did it allowed palette editing?).

Re: Color palette

PostPosted: 22 Jul 2014, 15:40
by Freddy
Update - I was able to modify the colors by changing the appropriate bytes in the pal_0.bbm file (why are there identical .lbm files?). Of course, it also changes the colors in the sprites, but for testing, this is ok.

The question is - should I attempt to create a modified palette? Or could the support for a separate player color pallete be added first (would simplify testing)?

Re: Color palette

PostPosted: 22 Jul 2014, 16:18
by pawel95
Maybe I´m wrong, but you are right Lewin: I have watched quickly into the mapeditor in the remake and it looks like there are 20 different "white" colors :mrgreen:

Re: Color palette

PostPosted: 22 Jul 2014, 16:53
by Krom
I guess easiest solution for us would be to add separate BBM or LBM palette file specially for player colors to choose from :)
I'm rather busy at the moment, but I hope Lewin or Andreus can take a look into this :)

Re: Color palette

PostPosted: 25 Jul 2014, 07:35
by Lewin
My thoughts:
The only reason for not using full RGB is so the UI is neater, since a full RGB selector is hard to fit. But from a technical point of view there's no reason not to allow colours to be full RGB (that's already how it works underneth). So the static script command that sets the colour can be in RGB, allowing testing new colours easily using a text mission editor (.DAT). So if the RGB colour is on the palette it will select that, otherwise it will be "custom" (maybe let people edit a hex code if they want, or just select the closest colour on the palette).

Using an RGB command in the static script also means we can change the palette later without messing up the indexes used in everyone's missions (if scripts contain palette indexes we can't change that palette which is restrictive). I see no reason to put the new palette into a BBM/LBM file since it's purely for UI purposes. Might as well hard code it like all our other UI stuff.

Re: Color palette

PostPosted: 25 Jul 2014, 08:20
by Freddy
I fully agree on using full RGB in the static script, maybe mention it as a note beside the pallete in the editor.

I suggest changing multiplayer colors to RGB as well and altering some of them, the blue, black a light green are too sharp. Perhaps I could whip up a list of RGB codes for the multiplayer? I know to some this seems like a minor thing, but I am seriously upset every time I see some of the colors.

Re: Color palette

PostPosted: 25 Jul 2014, 09:43
by Krom
Sounds good :)

Re: Color palette

PostPosted: 25 Jul 2014, 09:47
by Lewin
I fully agree on using full RGB in the static script, maybe mention it as a note beside the pallete in the editor.

I suggest changing multiplayer colors to RGB as well and altering some of them, the blue, black a light green are too sharp. Perhaps I could whip up a list of RGB codes for the multiplayer? I know to some this seems like a minor thing, but I am seriously upset every time I see some of the colors.
MP colours already are RGB, they're hard coded into the game. From KM_Defaults.pas:
  Code:
const //Colors available for selection in multiplayer MP_COLOR_COUNT = 18; MP_TEAM_COLORS: array [1..MP_COLOR_COUNT] of Cardinal = ( $FF0707FF, //Red $FF0061FF, //Orange $FF07FFFF, //Yellow $FF00D4A8, //Olive green $FF00FF00, //Lime green $FF008000, //Dark green $FF61793F, //Teal (Sea) $FFE3BB5B, //Cyan $FFFF0000, //Blue $FFBA3468, //Violet (Amethyst) $FF800080, //Purple $FFFF67FF, //Pink $FF000080, //Maroon $FF518FCF, //Peach $FF004F7D, //Brown $FFFFFFFF, //White $FF808080, //Grey $FF000000 //Black );
Note that it's $AABBGGRR (alpha blue green red). And before someone asks, the alpha must be FF, you can't have semi-transparent flags.

Feel free to suggest changes/improvements. But it's probably hard for you to test it until I add a command to set the colour in RGB.

Re: Color palette

PostPosted: 25 Jul 2014, 09:49
by Freddy
Aaaand done :) Color codes below, colors and how they look in KaM in attachment. Some are almost the same or totally the same, didn't add any new colors - wasn't really possible to keep them visually separated. Those that were changed were altered to not be so sharp and to better incorporate with the rest of the colors (the greens for example). I know this is just a suggestion, but personally I find this pallete much more pleasant.

Color codes:
in a post below in the correct format
Feel free to suggest changes/improvements. But it's probably hard for you to test it until I add a command to set the colour in RGB.
You posted just as I was writing my post... Testing wasn't hard, used the pal_0 file. If you want, I can rewrite the codes to fit your format.

For anyone wondering, testing colors like this and getting the codes is very easy with some kind of color picker (I got ColorPix - lets you pick a color from anywhere on your screen) and GIMP, which has a pallete editor, checkerboard filter and can export the pallete in several formats. If anyone wants to test something, I can also explain how to modify the pal_0 file to get new color in the editor.

Re: Color palette

PostPosted: 25 Jul 2014, 11:07
by Krom
@Freddy: Good work! :)

Just a sidenote, as I don't have KaM at hand, can you test your colors to be well distinguishable from terrain on minimap? )

Re: Color palette

PostPosted: 25 Jul 2014, 11:33
by Freddy
Thank you, Krom. I looked at it now and as far as I can tell, it's about the same as it was. Some colors are problematic all the time. On big maps, I sometimes had trouble noticing a small army that was in red. To make it bulletproof, the minimap would have to change.

Also, the list in the needed format:
  Code:
$FF00005E, // Maroon $FF0000EB, // Red $FF076CF8, // Orange $FF00C9FF, // Yellow $FF0EC5A2, // Lime green $FF00A100, // Bright green $FF134B00, // Dark green $FF7A9E00, // Teal $FFFACE64, // Sky blue $FF973400, // Blue $FFCB3972, // Violet (Amethyst) $FF720468, // Purple $FFDE8FFB, // Pink $FF519EC9, // Tan $FF103C52, // Brown $FFFFFFFF, // White $FF838383, // Grey $FF1B1B1B // Black

Re: Color palette

PostPosted: 26 Jul 2014, 01:58
by Lewin
Thanks Freddy, your colours look good. For some reason I feel that red should be at the top of the list, maybe because it's the default colour in KaM :P I think I'll move maroon to after brown.

EDIT: I've made a new palette for the map editor:
Image
Iterating RGB does not give an intuitive palette layout, so I generated this palette by iterating hue, brightness and saturation (in that order). There are 17 hues, 4 brightness levels and 4 saturation levels. At the bottom is a 16 colour grayscale from black to white. This gives 17*4*4 + 16 = 288 colours in total. Originally I used 15 hues so there were 256 colours, but then there was no solid yellow (just orange-yellow and yellow-green) so I increased it to 17 hues which gives a nice yellow. It still fits in the UI nicely so I don't think it's a problem.

Then I thought that saturation isn't as important as brightness, so I changed it to be: 17 hues, 5 brightness levels, 3 saturation levels: (15x18 grid)
Image
This seems better than the first palette, but it's hard to tell. Maybe you prefer the first one? (the first one has 18 more colours)

I think this palette is a fairly good compromise between:
- Covering a good range of colours
- Having a nice intuitive layout (each row is a different hue, darkest on left, brightest on right)
- Being easy to generate (I'm not going to hand pick 256 colours and manually lay them out on a grid, I want a simple algorithm like this to do it)

If someone wants to suggest a better palette (or algorithm to generate one) please let me know. Keep in mind that the colours are hard to judge within the palette, you need to see them on their own. For example the lowest saturation colours (columns of grey) look like they are almost completely grey, but when you see them on their own they are clearly not.

Re: Color palette

PostPosted: 27 Jul 2014, 22:40
by Freddy
@Lewin So can I expect the colors to be in the next release? :) Red being the "main" color didn't occur to me (I hate the color in KaM as it was forced onto me in the campaign :lol:)

Regarding the singleplayer editor palette - when I was looking into choosing colors in an easy and intuitive way, I ended up with the HSL color model. It is easy and intuitive to use and needs just three sliders and nothing else.
http://en.wikipedia.org/wiki/HSL_and_HSV
http://hslpicker.com

If you would consider using a picker instead of a palette, I think this would be the way to go.

From the two palettes you posted, the second one is better I think. After looking at it a bit, it seems that a lot of colors can actually be found there even if it doesn't look like it at the first glance. Although the brown selection took a hit I think...

Re: Color palette

PostPosted: 28 Jul 2014, 03:35
by Lewin
@Lewin So can I except the colors to be in the next release? :) Red being the "main" color didn't occur to me (I hate the color in KaM as it was forced onto me in the campaign :lol:)
Yes, your multiplayer colours are already implemented :)
Regarding the singleplayer editor palette - when I was looking into choosing colors in an easy and intuitive way, I ended up with the HSL color model. It is easy and intuitive to use and needs just three sliders and nothing else.
http://en.wikipedia.org/wiki/HSL_and_HSV
http://hslpicker.com

If you would consider using a picker instead of a palette, I think this would be the way to go.
I agree that this is a good way to choose colours (hence why the palettes I made are based off it), however that would require us to implement sliders that show a changing colour gradient across them, which is probably more effort than it's worth (all of our GUI controls are written by us so they can be in KaM style). For now we'll use a palette because we already have a control for that.
From the two palettes you posted, the second one is better I think. After looking at it a bit, it seems that a lot of colors can actually be found there even if it doesn't look like it at the first glance. Although the brown selection took a hit I think...
Yeah I also noticed there are less browns, and so I ended up going with the first palette (16 columns seems nicer than 15 for some reason :P). What do you think is better about the second one? It's not hard to change later.