Useful Map Colors

by Taehl

Consistently color-codes constructions on the map for clear recognition. Custom colors can be configured.

Tweaks
6 years ago
0.13 - 0.16
15

g what to put in when modifiying colors?

8 years ago

So I want to change the color of oil wells to something more bright (Im thinking green like the laser turrets or something in this general direction). My reason is that the black color it is right now is almost invisible...
this makes it really hard for me to search new oil fields. I know that oil isnt supposed to be magenta, but I now know, that they mare it magenta for a reason...
So I already found the config file and also the line where I need to alter the numbers to alter the colors:

dat.resource["crude-oil"].map_color = HSL(0, 1, .05, 0.65)

I have no Idea what numbers I have to put in to make it another color.
I would appreciate the oil wells being the same color as the electric furnaces. I am confused though since the electric furnace line has only three numbers:

{ "furnace", "electric-furnace", HSL(.12, .8, .5) },

while the oil wells have four (see above). can you tell me what I have to put in?

bonus: maybe you could tell me what those numbers do, so that I (or someone else who reads this thread) can alter other objects to their taste.

Thanks!

8 years ago
(updated 8 years ago)

Hi there. It can be a bit technical, but please allow me to explain how to specify colors. You should avoid changing anything except config.lua, just to be safe. For simplicity sake, each number should be a decimal between 0 and 1.

By default, Factorio uses RGB color where the first three numbers express color in terms of much red, green, and blue it has. Lower numbers are darker, and maxing all three gives you white. In RGB, magenta would be "full red and blue, no green" or "{ r=1, g=0, b=1 }".

I don't find RGB very convenient, so I also offer the HSL colorspace. Here, the three numbers stand for Hue (where in the color wheel the color is, from red at 0, green at .33, blue at .66, and red again at 1.0), Saturation (from grey at 0 to full vividness at 1), and Lightness (black at 0, white at 1). In this case, magenta would be "exactly between blue and red, full saturation and normal lightness", or "HSL( 5/6, 1, .5 )". You can mess around with a HSL color picker here: http://www.workwithcolor.com/hsl-color-picker-01.htm

The fourth number, which is optional, means Alpha in either case. Alpha is how transparent or opaque a color is, where 0 is completely invisible. Less than half alpha can be hard to see. For consistency with the alpha levels in UMC itself, I've specified levels for "slight", "part", and "full". If you don't specify alpha, it should default to 1.

With all that being said, the code you would want to add to your config.lua is one of these:
{ "resource", "crude-oil", { r=1, g=0, b=1, a=part } },
{ "resource", "crude-oil", HSL( 5/6, 1, .5, part) },

One final note: For some reason, Factorio accepts colors both in the range of 0-1 and 0-255. UMC is automatically compatible with both, just in case. If you have a color which is way off for no reason, double-check that none of its numbers are greater than 1 - if it is, Factorio assumes you're using the 0-255 range.

8 years ago
(updated 8 years ago)

So I tried out both lines of code by adding them to the config.lua file. I added them after the "return{" section. Sadly they both did not work for me...

You can still try to write me a new message on how to change the colour if you have another Idea, but I just remembered, that I also could just turn off the mod, search for oil patches and then reendable it again.

7 years ago
(updated 7 years ago)

Using both lines would be redundant because they do the same thing. Also, the line needs to be inside of the return, like this:
return {
{ "electric-pole", "big-wooden-pole", HSL(.1, 1.0, .8, part) },
{ "tile", "wood-floor", HSL(.1, .5, .3, full) },
{ "resource", "crude-oil", HSL( 5/6, 1, .5, part) },
}

This thread has been locked.