Actual behavior:
Reading LuaEntity.color with no custom color set returns nil.
Setting LuaEntity.color to nil will produces a "cannot index nil value" Lua error. This means that (a) mods apparently can't set entities back to the "default" color once it has been changed, and (b) every attempt to copy color from one entity to another must surrounded by a check to make sure the color value from the source entity is not nil.
Expected/desired behavior:
Reading LuaEntity.color with no custom color set returns nil.
Setting LuaEntity.color to nil should not produce an error, and should set the entity back to the "default" color. This would make the interface symmetric so that all values read from LuaEntity.color can also be assigned to LuaEntity.color.
[0.17.79][API] Error when setting LuaEntity.color to nil
Re: [0.17.79][API] Error when setting LuaEntity.color to nil
Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.