Changes the ambilight colours in the cache. When changing part of the pixels, the other pixels keep their value.
This resource accepts a JSON object with key/value pairs. It is allowed to send an object containing only the key/value pairs that need to be changed. See the JSON example for how these key/value pairs are passed.
Setting all pixels on all layers to the same colour:
{
"r": 100,
"g": 210,
"b": 30
}
Setting all pixels on layer 2 to the same colour. Other pixels keep their colour:
{
"layer 2:"
{
"r": 100,
"g": 210,
"b": 30
}
}
Setting all pixels on the left and right side on layer 1 to the same colour. Other pixels keep their colour:
{
"layer1":
{
"left":
{
"r": 100,
"g": 210,
"b": 30
},
"right":
{
"r": 100,
"g": 210,
"b": 30
}
}
}
Setting a specific pixel (e.g. pixel 5 at the top side) on layer 1 to a colour. Other pixels keep their colour:
{
"layer1":
{
"top":
{
"5":
{
"r": 100,
"g": 210,
"b": 30
}
}
}
}
Setting all pixels individually:
{
"layer1":
{
"left":
{
"0":
{
"r": 100,
"g": 210,
"b": 30
},
"1":
{
"r": 110,
"g": 220,
"b": 25
},
"2":
{
"r": 115,
"g": 230,
"b": 20
},
"3":
{
"r": 125,
"g": 235,
"b": 15
}
},
"top":
{
"0":
{
"r": 140,
"g": 250,
"b": 10
},
"1":
{
"r": 140,
"g": 250,
"b": 10
},
"2":
{
"r": 140,
"g": 250,
"b": 10
},
"3":
{
"r": 140,
"g": 250,
"b": 10
},
"4":
{
"r": 140,
"g": 250,
"b": 10
},
"5":
{
"r": 140,
"g": 250,
"b": 10
}
},
"right":
{
"0":
{
"r": 125,
"g": 235,
"b": 15
},
"1":
{
"r": 115,
"g": 230,
"b": 20
},
"2":
{
"r": 110,
"g": 220,
"b": 25
},
"3":
{
"r": 100,
"g": 210,
"b": 30
}
},
"bottom":
{
}
}
"layer2":
{
etc.
}
}