BigPizzaV3/CodexPlusPlus · error · anyhow::Error
invalid Dream Skin theme color: {color}
Error message
invalid Dream Skin theme color: {color} What it means
Validation guard in validate_theme_draft: when the draft supplies a colors object, each of the 10 palette slots (background, panel, accent, text, etc.) must be a valid CSS color per valid_css_color. Fires on any single malformed/unrecognized color string; the message names the offending value.
Source
Thrown at crates/codex-plus-core/src/dream_skin_library.rs:540
}
if !draft.config.style_preset.is_empty() && !valid_theme_id(&draft.config.style_preset) {
bail!("invalid Dream Skin style preset");
}
if let Some(colors) = &draft.config.colors {
for color in [
&colors.background,
&colors.panel,
&colors.panel_alt,
&colors.accent,
&colors.accent_alt,
&colors.secondary,
&colors.highlight,
&colors.text,
&colors.muted,
&colors.line,
] {
if !valid_css_color(color) {
bail!("invalid Dream Skin theme color: {color}");
}
}
}
Ok(())
}
fn valid_css_color(value: &str) -> bool {
let value = value.trim();
if let Some(hex) = value.strip_prefix('#') {
return matches!(hex.len(), 3 | 4 | 6 | 8)
&& hex.bytes().all(|byte| byte.is_ascii_hexdigit());
}
let body = value
.strip_prefix("rgb(")
.or_else(|| value.strip_prefix("rgba("))
.and_then(|value| value.strip_suffix(')'));
body.is_some_and(|body| {
!body.is_empty()View on GitHub (pinned to f2074595a2)
Solutions
- Replace the named color with a valid CSS color (hex, rgb(), or recognized named color)
- Remove the colors object to fall back to preset defaults
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_library.rs:540 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/3bf40daf827a1ff0.
Report an issue: GitHub.