Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
This node is part of a versatile no-code utility toolbox that supports multiple resources and operations. Specifically, the Generate - Color operation generates colors based on user-defined parameters such as hue, luminosity, count, seed, format, and alpha transparency. This can be useful in scenarios where you need to programmatically create color palettes for design, data visualization, or UI theming without manually picking colors.
For example, you might use this node to generate a set of bright blue colors in hex format for a dashboard, or create random pastel colors with specific transparency for graphical elements.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Allows defining variables used in code editor functions by specifying variable names/IDs and values. |
| Hue | The hue of the generated color (e.g., red, blue, green). |
| Luminosity | The luminosity level of the color; typical values include "light", "bright", or "dark". |
| Count | Number of colors to generate. |
| Seed | A seed string to produce deterministic color generation. |
| Format | Output color format, such as "rgb", "rgba", "hsl", "hsla", or "hex". |
| Alpha | Alpha transparency value of the color (from 0 to 1). |
Output
The output is a JSON array containing the generated color(s) according to the specified parameters. Each item in the array represents a color in the requested format and includes any applied alpha transparency.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authentication to the external service powering the utilities.
- The node makes HTTP POST requests to endpoints structured as
generate/colorwith the parameters provided. - No additional environment variables are explicitly required beyond the API key.
Troubleshooting
- Empty or invalid color output: Ensure that the hue, luminosity, format, and alpha parameters are valid and correctly spelled. For example, luminosity must be one of "light", "bright", or "dark".
- API authentication errors: Verify that the API key credential is correctly configured and has necessary permissions.
- Count parameter issues: If requesting multiple colors, ensure the count is a positive integer.
- Seed usage: Using a seed ensures repeatable results; if unexpected colors appear, check the seed string for correctness.
- General errors: If the node throws errors related to request payloads, double-check that all required parameters are provided and conform to expected types.
Links and References
- Color Generation Concepts
- CSS Color Formats
- n8n Expressions Documentation (for using expressions in variable definitions)