关于 hair-color-changer
hair-color-changer 是基于 each::sense 的照片头发颜色编辑技能,适合探索发色效果的用户。它支持自然色与幻想色,以及渐变、挑染和多轮调整。
主要功能
- 01更换自然色与幻想色
- 02制作渐变和挑染效果
- 03调整灰色与银色发色
- 04多轮尝试不同颜色
- 05修正现有发色
适用场景
- 01预览照片中的新发色
- 02比较渐变或挑染造型
- 03探索多种发色选项
- 04调整现有发色的色调
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill hair-color-changer安装后在 Claude Code 中输入/hair-color-changer确认已加载。
附带文件references/SSE-EVENTS.md
详细介绍
更改发色
使用 each::sense 更改照片中的发色。此技能支持逼真的发色更改,既可实现细微的自然变化,也可尝试大胆的奇幻色彩,还支持渐变、挑染和多色造型等复杂效果。
功能
- 自然发色:金发、棕发、黑发、红发、赤褐色
- 奇幻色彩:紫色、蓝色、粉色、绿色等
- 渐变效果:从发根到发梢平滑过渡
- 挑染与暗染:打造多维度发色效果
- 灰色与银色:优雅的银色、铂金色和灰色调
- 发色校正:修正或增强现有发色
- 多轮会话:反复调整效果并尝试不同颜色
快速开始
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change the hair color to platinum blonde, keep it looking natural and shiny"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
用例示例
1. 将头发改为金色
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change the hair to a warm honey blonde color. Keep the hair texture and shine natural, maintain realistic highlights throughout."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/original-photo.jpg"],
"mode": "max"
}'
2. 将头发改为棕色
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Transform the hair to a rich chocolate brown color. Add subtle warm undertones and natural-looking dimension to the brunette shade."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
3. 将头发改为红色/赤褐色
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change the hair color to a vibrant auburn red. Make it look like natural ginger hair with copper highlights that catch the light."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/model-photo.jpg"],
"mode": "max"
}'
4. 奇幻色彩(紫色、蓝色、粉色)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Transform the hair to a vivid galaxy purple color. Make it look like professionally dyed hair with deep violet tones and subtle blue undertones. Keep the hair healthy and shiny looking."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
# Electric blue hair
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change the hair to electric blue color, like a bold fashion statement. Mix of deep blue and bright cyan tones throughout."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo.jpg"],
"mode": "max"
}'
# Pastel pink hair
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Transform the hair to a soft pastel pink color. Think rose gold meets cotton candy - delicate, feminine, and Instagram-worthy."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/headshot.jpg"],
"mode": "max"
}'
5. 渐变效果
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create an ombre hair effect - dark brown roots transitioning smoothly to caramel blonde at the ends. Make the gradient look natural and well-blended like salon balayage."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/full-portrait.jpg"],
"mode": "max"
}'
# Fantasy ombre
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a fantasy ombre effect with dark purple roots fading into bright pink, then to peachy coral at the tips. Smooth gradient transitions like a sunset."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/model.jpg"],
"mode": "max"
}'
6. 挑染与暗染
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add dimensional highlights and lowlights to the hair. Keep the base color but add face-framing blonde highlights and subtle caramel lowlights throughout for depth and dimension."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/brunette-photo.jpg"],
"mode": "max"
}'
# Babylights effect
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add subtle babylights throughout the hair - very fine, delicate highlights like sun-kissed natural lightening. Keep it soft and natural looking."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "max"
}'
7. 灰色/银色头发
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Transform the hair to an elegant silver gray color. Make it look like intentional fashion-forward silver hair, not aging gray - metallic, shiny, and well-maintained."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/fashion-photo.jpg"],
"mode": "max"
}'
# Platinum silver
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change hair to platinum silver with icy undertones. Think high fashion editorial silver - cool-toned, luminous, and striking."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/model-headshot.jpg"],
"mode": "max"
}'
8. 自然发色变化
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Adjust the hair color to be 2 shades darker, turning it from medium brown to a deep espresso brown. Keep all the natural texture and shine."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/natural-photo.jpg"],
"mode": "max"
}'
# Warm up cool tones
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Add warm golden undertones to the existing hair color. Keep the same overall shade but remove any ashy tones and make it warmer and more vibrant."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait.jpg"],
"mode": "eco"
}'
9. 从同一张照片生成多种发色方案
使用 session_id 在同一张照片上尝试不同发色:
# First option - Blonde
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change my hair to platinum blonde. I want to see how I would look with this color."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/my-photo.jpg"],
"session_id": "hair-color-tryout-001",
"mode": "eco"
}'
# Second option - Red (same session)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Now show me the same photo but with fiery red hair instead."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "hair-color-tryout-001",
"mode": "eco"
}'
# Third option - Black (same session)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "And one more variation with jet black hair please."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "hair-color-tryout-001",
"mode": "eco"
}'
10. 效果前后对比
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change the hair to rose gold color, then create a side-by-side before and after comparison showing the original on the left and the new color on the right."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/original-portrait.jpg"],
"mode": "max"
}'
# Iterative refinement for comparison
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Transform the hair to strawberry blonde."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/client-photo.jpg"],
"session_id": "client-consultation-001",
"mode": "max"
}'
# Follow-up to adjust
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Make the strawberry blonde a bit more pink and less orange. Also make it slightly lighter overall."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "client-consultation-001",
"mode": "max"
}'
最佳实践
获得逼真的效果
- 光线良好:使用头发光线清晰、均匀的照片
- 头发清晰可见:确保头发清晰可见,未被遮挡
- 正面拍摄:正面或 3/4 角度的照片效果最佳
- 高分辨率:源图像质量越高,效果越好
提示词技巧
- 描述具体:说明想要的确切色调(例如“暖蜂蜜金色”,而不只是“金色”)
- 说明色调倾向:提及底色倾向(暖色、冷色、中性色、灰调、金调)
- 保留发丝质感:要求保留自然质感和光泽
- 合理预期:在较浅的底色上,奇幻色彩可能会显得更加鲜艳
提示词结构示例
"Change the hair to [specific color with undertones].
[Additional details about dimension, highlights, or effects].
Keep the hair looking [natural/healthy/shiny/textured]."
模式选择
“您想要快速出结果,还是追求最高质量?”
| 模式 | 最适合的场景 | 速度 | 质量 |
|---|---|---|---|
max | 最终成片、客户展示、作品集 | 较慢 | 最高 |
eco | 快速预览、尝试多种发色、探索构思 | 较快 | 良好 |
多轮发色探索
使用 session_id 反复调整并探索不同发色:
# Start with a base change
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Change my hair to copper red"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/selfie.jpg"],
"session_id": "hair-exploration"
}'
# Request adjustment
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Make it more auburn and less orange, add some brown lowlights"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "hair-exploration"
}'
# Try a completely different direction
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Actually, let me see the original photo with silver gray hair instead"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "hair-exploration"
}'
错误处理
| 错误 | 原因 | 解决方案 |
|---|---|---|
Failed to create prediction: HTTP 422 | 余额不足 | 前往 eachlabs.ai 充值 |
| 未检测到头发 | 图像中的头发不可见 | 使用头发清晰可见的照片 |
| 效果不自然 | 源图像质量较低 | 使用光线良好的高分辨率照片 |
| 超时 | 生成过程复杂 | 将客户端超时设置为至少 10 分钟 |
相关技能
each-sense- 核心 API 文档face-swap- 人脸替换功能image-edit- 通用图像编辑product-photo-generation- 电商产品照片生成
评论
支持 Markdown