Page 1 of 1
Widget: Common Colors
Posted: 26 Sep 2013, 04:40
by CarRepairer
This widget overrides team colors.
Features:
- Assigns consecutive colors to teammates from a colorwheel that I put together.
- If two people are using this widget they will both see the same colors assigned to the game's teams.
- Colors should change from game to game (see technical info).
- Works with ZK's Simple Team Colors minimamp button.*
* You must disable the Local Team Colors widget then enable this one. If it's already enabled, disable/enable again. Failure to do so will cause the button press to enable ZK's widget again.
I did my best to throw together a color wheel where the colors are distinct enough. I used HTML color code names. Type
/luaui commoncolors to see the color names and to whom they are assigned.
Technical stuff:
In order to maintain variety between games it needs to choose a random starting position on the colorwheel, but that random spot must be the same for all users of the widget so it needs a common piece of info. Since the GameID is almost impossible to get and many other methods were deemed unfit (for example player names and IDs may change throughout the course of the game if people drop or midgame-join) the only two stable criteria I could think of were map name and team count. If any of map name, player count, or player team ID assignments change at all then you'd have variety between games.
Version 0.004
Re: Widget: Common Colors
Posted: 26 Sep 2013, 11:53
by Google_Frog
I'd like to use this but Teal Culture is too strong. The alternative is to write a widget which parses chat such that one player can say green and the other player will receive blue such that they are talking about the same player.
Re: Widget: Common Colors
Posted: 26 Sep 2013, 19:41
by zwzsg
CarRepairer wrote:I did my best to throw together a color wheel where the colors are distinct enough.
To have distinct colors, in my widget I split evenly the hue, set saturation to max and lightness around middle, then do a HSL->RGB conversion. Here's the code I use:
http://pastebin.ca/2458794
Re: Widget: Common Colors
Posted: 26 Sep 2013, 19:53
by luckywaldo7
Google_Frog wrote:I'd like to use this but Teal Culture is too strong. The alternative is to write a widget which parses chat such that one player can say green and the other player will receive blue such that they are talking about the same player.
This is pretty much the best solution I have ever heard to anything.
Although I for one think it's about time we get this
Magenta Revolution into gear anyway.
Re: Widget: Common Colors
Posted: 26 Sep 2013, 20:45
by CarRepairer
zwzsg wrote:CarRepairer wrote:I did my best to throw together a color wheel where the colors are distinct enough.
To have distinct colors, in my widget I split evenly the hue, set saturation to max and lightness around middle, then do a HSL->RGB conversion. Here's the code I use:
http://pastebin.ca/2458794
Very nice, I like your programmatic approach. In fact, quantum had implemented something like this in Springie at one point.
The problem was, although it's mathematically correct to have hues separated evenly, it didn't always result in colors easy to distinguish by the human eye. ZK games for example tend upwards of 10v10 and some divisions in the color space were harder to distinguish like dark blues, probably to do with our lacking in blue cones or something.
Trying your widget, some colors I'd consider a little too close, and there might not be any way to decide that other than experimentation and choosing a hardcoded list of colors as I did (still not easy to find 20 colors for 10v10 games but I did my best).

Re: Widget: Common Colors
Posted: 27 Sep 2013, 00:11
by zwzsg
According to
this paper, because human vision doesn't respond linearly to increase in luminance, and because our three cones don't have the same weight (making pure blue appear darker than pure yellow), HSV/HSL/HSB are flawed systems. It says to instead use CIE
L*a*b* or
L*u*v*.
Re: Widget: Common Colors
Posted: 27 Sep 2013, 00:25
by CarRepairer
I'd be tempted to try it if not for all the time I'd sweat over trying to comprehend those formulae enough to turn them into lua code. If you gave it a shot, I wouldn't mind.
Re: Widget: Common Colors
Posted: 27 Sep 2013, 02:40
by smoth
luckywaldo7 wrote:Although I for one think it's about time we get this Magenta Revolution into gear anyway.
I miss the days when I was able to post in pink
Re: Widget: Common Colors
Posted: 27 Sep 2013, 22:34
by CarRepairer
A 21 player game. Too much?

Re: Widget: Common Colors
Posted: 27 Sep 2013, 23:12
by smoth
unrelated but how did they manage to not die off from fps death? Also nah, not too much. IIRC spring can have 32 players?
Re: Widget: Common Colors
Posted: 27 Sep 2013, 23:59
by luckywaldo7
That color distribution looks good. And a 21 player game is what I would consider 'worst case scenario' but I guess it's a thing anyway.
Re: Widget: Common Colors
Posted: 28 Sep 2013, 13:33
by Forboding Angel
Car, you are my hero. I want to be like you when I grow up.
Re: Widget: Common Colors
Posted: 28 Sep 2013, 19:22
by CarRepairer
Thanks forb, just keep drinking your milk, or whatever it is we say to kids.
21 colors is uncomfortable. In the screenshot you can see a couple of pairs that might be hard to distinguish, like cyan & aquamarine or green & darkgreen. That parchment is also a little too close to white, leaving the parchment player unable to easily see which of his icons are selected on the minimap. It's tough to find enough colors. If we were all mantis shrimp this wouldn't be an issue (thanks Picasso for informing me about that theoatmeal piece).
This also lead to a short discussion with jK about how best to apply teamcolor to models. Too much blending leaves the teamcolor less prominent and therefore less distinguishable from similar ones.
Re: Widget: Common Colors
Posted: 28 Sep 2013, 20:32
by smoth
teamplaters and healthbars?
Re: Widget: Common Colors
Posted: 29 Sep 2013, 13:02
by Forboding Angel
my only real complaint is that in 1v1 games, the colors chosen are of the same spectrum. Like light pink vs purple. Or teal vs, darker teal.
Should definitely choose colors not in the same spectrum.
And could you throw in a randomizer so that you don't get the same colors all the time on the same map with same number of people?
Re: Widget: Common Colors
Posted: 29 Sep 2013, 17:49
by CarRepairer
No because that would break the feature that everyone sees the same colors. See technical info in first post.
Re: Widget: Common Colors
Posted: 30 Sep 2013, 09:24
by msafwan
According to this paper, because human vision doesn't respond linearly to increase in luminance, and because our three cones don't have the same weight (making pure blue appear darker than pure yellow), HSV/HSL/HSB are flawed systems. It says to instead use CIE L*a*b* or L*u*v*. -zwzg
Hi,
To get list of colour that is psychologically "equidistant" from each other, you must use standardized colour palette. Its like the colour palette for "Font colour", except that it has been tested experimentally with many people. Example is:
"Munsel Colour Palette"
You can use HTML colour to backtrack to standardized colour & get the RGB
- use this
web app(click me) and set colour collection to:
"DIN system"
Or... you can browse thru the colour palette one-by-one using this
web app(click me) & get the RGB.
There is also source-code for
CIECAM02 colour system but you don't need it for static colour (because the purpose of the code is to take account for psychological effect of surrounding colour/dynamic reproduction).
Re: Widget: Common Colors
Posted: 30 Sep 2013, 10:18
by Anarchid
Example is: "Munsel Colour Palette"
LAB/LUV postdate Munsel.
Re: Widget: Common Colors
Posted: 03 Oct 2013, 19:17
by PicassoCT
CarRepairer wrote:Thanks forb, just keep drinking your milk, or whatever it is we say to kids.
21 colors is uncomfortable. In the screenshot you can see a couple of pairs that might be hard to distinguish, like cyan & aquamarine or green & darkgreen. That parchment is also a little too close to white, leaving the parchment player unable to easily see which of his icons are selected on the minimap. It's tough to find enough colors. If we were all mantis shrimp this wouldn't be an issue (thanks Picasso for informing me about that theoatmeal piece).
This also lead to a short discussion with jK about how best to apply teamcolor to models. Too much blending leaves the teamcolor less prominent and therefore less distinguishable from similar ones.
All hail the mantis shrimp molotow cocktail