There is a slight difficulty in changing the background colour for individual rooms - how much of the background do they take up? It might be possible to draw a coloured rectangle
behind each room as it is drawn, but that could only sensibly occupy half the distance out from the room to an adjacent room that was a unit distance away, and even then the map drawing code would have to make two passes through the rooms to draw the backgrounds before anything else. It could be doable but it would slow things down...!
To store the information I think we would have to revise the map file format - which would instantly become incompatible with any previous Mudlet version - we have done that from time to time and I, personally would like to include a "down-grade" option so that temporarily a user could save their map in the previous former
with the loss of the new data so that the use could share maps with more cautious persons who have not (yet) adopted a new, possibly development version.
The map colours (environments) are a bit confusing at present, as I understand it:
- the colours 1-16 are sort of system reserved and seem to be a lookup table type thing, set in a XML format map sent from an IRE MUD where they might be remapped to any other colour (but there has never been code to do that), but if they could be set to "1" to "16" respectively (which they are NOT and can not be currently by the user) they would map to the 16 colours set in the "mapper colours" on the "profile preferences" or to any custom colour above 16.
- the colours 17-256 can be set via the lua setCustomEnvColor() command which requires an alpha value which is not reported by the corresponding getCustomEnvColorTable().
- the colours 257-272 are mapped (at least initially) to the same as the 16 colours in the "mapper colours" on the "profile preferences" but can be overwritten by the lua command.
- the colours above 257 can also be set via lua command or by using the define colour option to the 2D Mapper's colour command - the latter automatically assigns a new colour/env Id which currently will be after the last colour defined in the range 257-272 so will start at 273 but does not allow the entry of an alpha value and it doesn't tell you when you are defining the colour what that ID will be!
There is not currently IIRC a way to remove colours from the customEnv table or, other than by inspection of the data returned from the lua getCustomEnvColorTable() which though doesn't include the alpha value so two entries could appear to be the same but the code does not tell you/your script.
You can set the colour of any room with the 2D mapper UI though the code does not currently indicate the colour used for the selected room(s) or via lua command { setRoomEnv(roomId, envId) } and you can find the current value {with getRoomEnv(roomId) which returns the envId to look up in the getCustomEnvColorTable() returned data}...
If a colour is specified for a room and that value does not exist it will be painted either the dark or light red on the mapper colour dialog - without diving into the code I can't recall which is used...
Hope that helps a little!