Currently you can only set lamp colors by using signals that go into the lamp. These can be customized but still require the implementation of a signal for every color that you wish to use. If it was possible to set lamp color (or tint) directly from LUA, a mod that works with lamp colors, A. Wouldn't need to implement loads of signals, B. Could control everything directly from the lamp. I was attempting to make an RGB lamp mod that would take in 0-255 values for Red, Green, and Blue but found it not possible without direct lamp control. The main reason it's not possible is there is a maximum number of signals that can be added into the game(which is less than every RGB color) . It also would take a serious amount of memory to hold all these signals.
So overall it'd be nice if we had the ability to directly set lamp color/tint from LUA.
Set color of lamp directly
-
- Burner Inserter
- Posts: 10
- Joined: Thu Nov 03, 2016 4:58 am
- Contact:
Re: Set color of lamp directly
You can get a reasonable approximation by rounding every RGB value to multiples of 51. This gives 6 colors per channel, or 216 colors total. This is the basis for the old web safe color palette.