Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// set using rgb value
pixelcolor = options.rgb || null;
} else {
return pixel.color;
}
if (pixelcolor != null) {
// fill out the values for the pixel and then send the message to update
// it on the strip
with (pixel.color) {
r = pixelcolor[0];
g = pixelcolor[1];
b = pixelcolor[2];
hexcode = ColorString.hexString(pixelcolor);
color = ColorString.keyword(pixelcolor);
rgb = pixelcolor;
}
color = ColorString.colorValue(pixelcolor);
if (sendmsg) {
var msg = "{" + pixel.addr + ":" + color + "}";
pixel.firmata.sp.write(makeSysExString(msg));
}
} else {
console.log("color supplied couldn't be parsed: " + pixelcolor);
}
};
keyword: function () {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function () {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function() {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function() {
return string.keyword(values.rgb, values.alpha);
},
keyword: function() {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function() {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function() {
return string.keyword(this.values.rgb, this.values.alpha);
},
keyword: function () {
return string.keyword(this.values.rgb, this.values.alpha);
},