rootcastleco/rei-skills / registry/external-reviewed/themed-color-picker
themed-color-picker
VerifiedUse ThemedColorPicker in a layrz Flutter widget. Apply when adding a color selection field — opens a dialog with wheel and/or palette pickers.
Dart syntax: This library requires Dart ≥ 3.10. Use dot shorthand for all enum values (e.g.
.both,.wheel) — never write the fully-qualified form (ColorPickerType.wheel).
Full constructor and property reference: read
references/api.mdin this skill's directory.
When to use
- Any field where the user must pick a
Colorvalue - Inline trigger via the standard field UI (color swatch prefix + palette icon suffix)
- Custom trigger via
customChild(wraps any widget in anInkWell)
Minimal usage
ThemedColorPicker(
labelText: context.i18n.t('entity.color'),
value: color,
errors: context.getErrors(key: 'color'),
onChanged: (value) {
color = value;
if (context.mounted) onChanged.call();
},
)
Key behaviors
- Default picker types:
[.both, .wheel]— shows both the palette grid and the color wheel. - Falls back to
kPrimaryColorwhenvalueisnull. - The field displays a colored swatch as a prefix and the hex string as text (readonly).
customChildmode: any widget can be used as the trigger; the dialog still opens on tap.saveText/cancelTextdefault to"OK"/"Cancel"— override with i18n strings.- Exactly one of
label/labelTextmust be set — assert enforced.
Common patterns
// Wheel only (no palette)
ThemedColorPicker(
labelText: context.i18n.t('entity.color'),
value: color,
enabledTypes: const [.wheel],
onChanged: (value) {
color = value;
if (context.mounted) onChanged.call();
},
)
// Custom child trigger
ThemedColorPicker(
labelText: context.i18n.t('entity.color'),
value: color,
customChild: Container(
width: 40,
height: 40,
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(8),
),
),
onChanged: (value) {
color = value;
if (context.mounted) onChanged.call();
},
)
// Localized button labels
ThemedColorPicker(
labelText: context.i18n.t('entity.color'),
value: color,
saveText: context.i18n.t('actions.save'),
cancelText: context.i18n.t('actions.cancel'),
onChanged: (value) {
color = value;
if (context.mounted) onChanged.call();
},
)
// Disabled
ThemedColorPicker(
labelText: context.i18n.t('entity.color'),
value: color,
disabled: true,
)
Form conventions
- Guard
onChangedwithif (context.mounted)before calling the parent callback. - Use
context.i18n.t('entity.fieldName')forlabelText— never hardcode strings. - Pass
errors: context.getErrors(key: 'fieldName'). - Separate stacked inputs with
const SizedBox(height: 10).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |