/execute @e[name=GREENLIGHT] ~ ~ ~ particle reddust ~ ~.5 ~ -1 1 0 1 0 force

/execute @e[name=REDLIGHT] ~ ~ ~ particle reddust ~ ~.5 ~ 0 0 0 1 0 force

Explanation

How to make working Christmas lights

/testforblock -1805 54 128 minecraft:lever 12

This small command modification allows you to make working Christmas lights!


Command used to summon the armorstands: /summon ArmorStand ~ ~ ~ {NoGravity:1,Marker:1,Invulnerable:1,CustomName:GREENLIGHT}


 ▶ [Set on 'repeat' and 'always active'] The first command (the one at the bottom) is a /testforblock command. All it does, it checks when there is a specified block in a specified coordinate. When the command block detects (in our case) an active lever on the pillar that we built, it sends redstone signal to the command block that is pointing. If your lever is facing in different directions than mine, you'll have to change the data value of it (in my case was "12", you'll have to try from 1 to 15 until you see the command working).


 ▶ [Set on 'chain', 'conditional' and 'always active'] The second command receives redstone signal only when the previous command block has successfully executed a command because it is set to conditional. When it receives redstone signal, it generates some red particles at every armorstands named REDLIGHT.


You can change the colour of the particles in every colour you want by changing the values of DX, DY & DZ. You can see those values highlighted on the following command: /particle reddust ~ ~.5 ~ 0 0 0 1 0 force

​Use them as R G B colour values to determine a colour. You can find RGB values of colours on this webpage.

Remember to set the speed count always to zero ( /particle reddust ~ ~.5 ~ 0 0 0 1 0 force ) or you will see random colours.


Here's an example of different particle colours:

​-   /particle reddust ~ ~5 ~ -1 1 0 1 force

​-   /particle reddust ~ ~5 ~ -1 -1 1 1 force

​-   /particle reddust ~ ~5 ~ 0 0 1 1 force

​-   /particle reddust ~ ~5 ~ 0 1 0 1 force



 ▶ [Set on 'chain', 'conditional' and 'always active'] The third command works in the same exact way as the second one. It only has some different values that make the particles green.