xiaohongshu
xiaohongshu
fastled-color-specialist
FastLED color expert for palette generation, color math, performance optimization, and LED effect debugging across any FastLED project.
Full skill instructions
Expert guidance on FastLED color theory, color space mathematics, palette design, and performance optimization.
This skill should be triggered when:
RGB to HSV:
// FastLED provides CHSV type for HSV colors
CHSV color_hsv = rgb2hsv_approximate(CRGB(255, 128, 0)); // Orange
// H: 0-255 (0° = red, 85° = green, 170° = blue)
// S: 0-255 (0 = white, 255 = saturated)
// V: 0-255 (0 = black, 255 = bright)
HSV to RGB:
CRGB color_rgb = CHSV(42, 255, 255); // Bright yellow
HEX to RGB:
// Common FastLED web colors
CRGB red = CRGB::Red; // 0xFF0000
CRGB blue = CRGB::Blue; // 0x0000FF
CRGB custom = CRGB(0xAA, 0xBB, 0xCC); // Define custom
Complementary (2 colors, high contrast):
// Pick primary color in HSV, add 128 to hue for opposite
CHSV primary(30, 255, 255); // Orange
CHSV complement(158, 255, 255); // Blue-green (30 + 128 = 158)
Triadic (3 colors, balanced energy):
// Equally spaced 85° apart (255/3 = 85)
CHSV color1(0, 255, 255); // Red
CHSV color2(85, 255, 255); // Green
CHSV color3(170, 255, 255); // Blue
Analogous (3 colors, harmonious):
// Colors 30° apart (adjacent on color wheel)
CHSV primary(60, 255, 255); // Yellow
CHSV left(30, 255, 255); // Yellow-orange
CHSV right(90, 255, 255); // Yellow-green
Tetradic (4 colors, complex):
// Two complementary pairs (85° spacing, doubled)
CHSV c1(0, 255, 255); // Red
CHSV c2(85, 255, 255); // Green
CHSV c3(128, 255, 255); // Cyan (complement of Red)
CHSV c4(213, 255, 255); // Magenta (complement of Green)
Linear interpolation (blend two colors):
CRGB blend(CRGB color1, CRGB color2, uint8_t position) {
// position: 0 = color1, 128 = middle, 255 = color2
return blend8(color1, color2, position);
}
Gradient (smooth transition across array):
fill_gradient_RGB(leds, NUM_LEDS, CRGB::Red, CRGB::Blue);
// Smooth transition from red to blue across all LEDs
Color cycling (fade in/out):
// HSV allows easy brightness variation
CHSV color(Hue, Saturation, brightness); // Adjust value/brightness
fadeToBlackBy(leds, NUM_LEDS, fade_amount); // Dim all
Why it matters: Human eyes perceive brightness non-linearly. Gamma correction makes colors look natural.
// FastLED applies gamma correction with proper scaling
// Use these gamma tables for consistency:
const uint8_t gamma8[] = { /* lookup table */ };
// Apply to single LED
leds[0] = CRGB(gamma8[r], gamma8[g], gamma8[b]);
Memory efficient patterns:
CHSV instead of CRGB when storing palettes (3 bytes vs 3 bytes, but more efficient for color manipulation)Speed optimization:
rgb2hsv_approximate() is faster than rgb2hsv()fill_solid() and fill_gradient_RGB() for bulk operationsColor order (critical for some LED types):
// Define color order for your LED type (often RGB or GRB)
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
Reference documentation in references/:
Check the Quick Reference section above for immediate patterns.
Use reference files for:
All reference files contain practical code examples you can copy and adapt.
Comprehensive documentation covering:
Helper utilities for:
"I want vibrant, energetic colors" → Triadic or tetradic palettes with high saturation "I want calming, natural colors" → Analogous palettes with mid saturation "I need high contrast" → Complementary pairs "Colors look wrong/washed out" → Check gamma correction and color order "Animation is slow" → Optimize palette generation, use pre-calculated colors "Banding/posterization visible" → Use HSV color space for smoother gradients
This skill is specialized for color work. For general FastLED questions (library setup, LED control, timing), refer to the general FastLED skill.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience