Registry / web-framework / node-red-color

node-red-color

JSON →
library1.0.0jsnpmunverified

A Node-RED node that stores a user-picked color in msg.color. Version 1.0.0, stable but limited to Node-RED ecosystem. Requires farbtastic dependency for the color picker UI. Not actively maintained.

npm install node-red-color
INSTALL
IMPORT
SIG · NODE-RED-COLOR
N
node-red-color
web-frameworkjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

✓ npm install node-red-color
✗ npm install -g node-red-color
Node-RED nodes should be installed locally or in the Node-RED user directory.
functionGlobalContext
✓ // not applicable (Node-RED node)
Node-RED nodes are not imported via JavaScript; they are loaded by Node-RED at startup.
RED.nodes.registerType
✓ module.exports = function(RED) { RED.nodes.registerType('color', ColorNode); }
✗ require('node-red-color')
Node-RED nodes must export a function that registers the node type with RED.

Install the node, add it to a flow, configure a color, deploy, and see the color in msg.color.

// In Node-RED, install via Manage Palette or npm: // npm install node-red-color // Then add a 'color' node from the palette. // Configure: select a color in the picker. // Deploy. The node sets msg.color to the chosen color string. // Example flow: [{"id":"1","type":"color","name":"My Color"}] // Output: msg.color = "#ff0000" (example)
Debug
Known issues
gotchafarbtastic dependency is not included in npm install
fix
Manually ensure farbtastic is available (e.g., via <script> tag or bundling).
affects: >=0.0.0
deprecatedNode-RED nodes should be installed locally, not globally
fix
Use npm install node-red-color in the Node-RED user directory (e.g., ~/.node-red).
affects: >=1.0.0
breakingNo exports or JavaScript API; only works as Node-RED node
fix
Cannot be used outside Node-RED; it's a node for Node-RED flows.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'farbtastic'
farbtastic is required but not installed
fix
Include farbtastic in your Node-RED environment, e.g., npm install farbtastic.
Node type 'color' not found
Node not installed correctly
fix
Install node-red-color via Manage Palette or npm in the Node-RED user directory.
TypeError: Cannot read property 'color' of undefined
Trying to use node outside Node-RED
fix
Only use within Node-RED, e.g., in a flow.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
farbtasticrequiredUI color picker widget used by the node
Agent activity
8 hits · last 30 days
node
8
Resources
node-red-color — npm install node-red-color · libregistry