{"record":{"id":"3bf40daf827a1ff0","repo":"BigPizzaV3/CodexPlusPlus","slug":"invalid-dream-skin-theme-color-color","errorCode":null,"errorMessage":"invalid Dream Skin theme color: {color}","messagePattern":"invalid Dream Skin theme color: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_library.rs","lineNumber":540,"sourceCode":"    }\n    if !draft.config.style_preset.is_empty() && !valid_theme_id(&draft.config.style_preset) {\n        bail!(\"invalid Dream Skin style preset\");\n    }\n    if let Some(colors) = &draft.config.colors {\n        for color in [\n            &colors.background,\n            &colors.panel,\n            &colors.panel_alt,\n            &colors.accent,\n            &colors.accent_alt,\n            &colors.secondary,\n            &colors.highlight,\n            &colors.text,\n            &colors.muted,\n            &colors.line,\n        ] {\n            if !valid_css_color(color) {\n                bail!(\"invalid Dream Skin theme color: {color}\");\n            }\n        }\n    }\n    Ok(())\n}\n\nfn valid_css_color(value: &str) -> bool {\n    let value = value.trim();\n    if let Some(hex) = value.strip_prefix('#') {\n        return matches!(hex.len(), 3 | 4 | 6 | 8)\n            && hex.bytes().all(|byte| byte.is_ascii_hexdigit());\n    }\n    let body = value\n        .strip_prefix(\"rgb(\")\n        .or_else(|| value.strip_prefix(\"rgba(\"))\n        .and_then(|value| value.strip_suffix(')'));\n    body.is_some_and(|body| {\n        !body.is_empty()","sourceCodeStart":522,"sourceCodeEnd":558,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/dream_skin_library.rs#L522-L558","documentation":"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.","triggerScenarios":"Thrown at crates/codex-plus-core/src/dream_skin_library.rs:540 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}