1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/digiRGB/78-digiRGB.html

35 lines
1.1 KiB
HTML
Raw Normal View History

<script type="text/x-red" data-template-name="digiRGB">
<div class="form-row">
2014-09-03 17:12:26 +02:00
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="DigiSpark">
</div>
2016-03-02 14:25:52 +01:00
<div class="form-tips">Expects a <code>msg.payload</code> with three part csv string of r,g,b.</div>
</script>
<script type="text/x-red" data-help-name="digiRGB">
<p>Simple output node to drive digispark RGB</p>
2016-03-02 14:25:52 +01:00
<p>Requires <code>msg.payload</code> to be of the form 'r,g,b' decimals 0-255, or a hex string "#rrggbb". For example:</p>
<ul><li>Red : "255,0,0"</li><li>Green : "#00FF00"</li></ul>
</script>
<script type="text/javascript">
RED.nodes.registerType('digiRGB',{
category: 'output',
color:"GoldenRod",
defaults: {
name: {value:""}
},
inputs:1,
outputs:0,
icon: "light.png",
align: "right",
label: function() {
return this.name||"digiSparkRGB";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>