npx claudepluginhub 15195999826/lomomarketplace --plugin UE_ReactUMGWant just this skill?
Then install: npx claudepluginhub u/[userId]/[slug]
ReactUMG 颜色/色彩类型速查。在设置背景色、前景色、透明度、ColorAndOpacity、BrushColor、ForegroundColor 等颜色属性时激活。帮助区分 SlateColor(嵌套结构)和 LinearColor(直接结构)的正确用法,以及 ColorUseRule 的必要性。
This skill uses the workspace's default tool permissions.
ReactUMG 颜色类型速查
两种颜色类型
| 类型 | 结构 | 示例 |
|---|---|---|
| SlateColor | {SpecifiedColor: {R, G, B, A}} | 嵌套结构 |
| LinearColor | {R, G, B, A} | 直接结构 |
属性 → 类型映射
| 组件 | 属性 | 类型 |
|---|---|---|
| TextBlock | ColorAndOpacity | SlateColor |
| TextBlock | ShadowColorAndOpacity | LinearColor |
| Border | BrushColor | LinearColor |
| Border | ContentColorAndOpacity | LinearColor |
| Image | ColorAndOpacity | LinearColor |
| Button | ForegroundColor (in style) | SlateColor |
| WidgetStyle | ForegroundColor | SlateColor |
| WidgetStyle | FocusedForegroundColor | SlateColor |
正确用法
// SlateColor(嵌套)
<TextBlock
ColorAndOpacity={{
SpecifiedColor: {R: 0.9, G: 0.95, B: 1, A: 1}
}}
/>
// LinearColor(直接)
<Border
BrushColor={{R: 0.05, G: 0.08, B: 0.1, A: 0.95}}
/>
⚠️ 关键规则:ColorUseRule
WidgetStyle 中的颜色必须加 ColorUseRule: 0
// ✅ 正确
WidgetStyle={{
ForegroundColor: {
SpecifiedColor: {R: 0.5, G: 0.5, B: 0.5, A: 1},
ColorUseRule: 0 // 必须!
}
}}
// ❌ 错误(颜色不会生效)
WidgetStyle={{
ForegroundColor: {
SpecifiedColor: {R: 0.5, G: 0.5, B: 0.5, A: 1}
// 缺少 ColorUseRule: 0
}
}}
快速判断方法
查看 IDE 错误信息:
"R does not exist in type RecursivePartial<SlateColor>"→ 用 SlateColor"SpecifiedColor does not exist in type RecursivePartial<LinearColor>"→ 用 LinearColor
Similar Skills
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.