astrid-runtime/astrid · error
branding.accent-color: {e}
Error message
branding.accent-color: {e} What it means
Same check as primary-color but for [branding].accent-color: validate_hex_color must accept the value, else the error is re-raised with the 'branding.accent-color:' prefix. It indicates the accent color string in the distro manifest is not a well-formed hex color.
Source
Thrown at crates/astrid-cli/src/commands/distro/validate.rs:252
}
// Branding — only structural rails. The dashboard interprets the
// values; the parser just refuses obvious garbage.
if let Some(branding) = &manifest.branding {
if let Some(icon) = &branding.icon
&& icon.len() > 64 * 1024
{
anyhow::bail!(
"branding.icon is {} bytes — distros must not embed assets larger than 64 KiB",
icon.len()
);
}
if let Some(color) = &branding.primary_color {
validate_hex_color(color)
.map_err(|e| anyhow::anyhow!("branding.primary-color: {e}"))?;
}
if let Some(color) = &branding.accent_color {
validate_hex_color(color).map_err(|e| anyhow::anyhow!("branding.accent-color: {e}"))?;
}
}
Ok(())
}
/// Enforce a manifest's `[distro].astrid-version` floor against the running CLI.
///
/// Called on the init / `distro apply` path *after* the manifest is fetched and
/// parsed but *before* any prompting or install, so a distro whose `Distro.toml`
/// (fetched from the repo `main` tip) bumps its CLI floor fails fast with an
/// actionable message instead of breaking onboarding mid-flight on an older CLI.
///
/// A manifest with no `astrid-version` floor imposes no requirement.
pub(crate) fn enforce_astrid_version(manifest: &DistroManifest) -> anyhow::Result<()> {
let Some(req) = manifest.distro.astrid_version.as_deref() else {
return Ok(());
};View on GitHub (pinned to affd8760f4)
Solutions
- Set accent-color to a valid hex color such as '#ff6600'.
- Verify character count and hex alphabet (0-9, a-f) after the '#'.
- Remove the accent-color key if a custom accent is not required.
Example fix
# before (Distro.toml) [branding] accent-color = "rgb(255, 102, 0)" # after [branding] accent-color = "#ff6600"
Defensive patterns
Strategy: validation
Validate before calling
fn is_hex_color(s: &str) -> bool {
let t = s.strip_prefix('#').unwrap_or(s);
t.len() == 6 && t.chars().all(|c| c.is_ascii_hexdigit())
}
// apply to branding.accent-color before shipping the manifest Prevention
- Mirror the same hex format used for primary-color.
- Keep a branding snippet with known-good colors and copy from it.
- Validate the manifest in CI with `astrid distro validate`.
When it happens
Trigger: validate_manifest with branding.accent-color set to a non-hex value: named color, missing '#', wrong digit count, invalid hex characters.
Common situations: Designers exporting 'accent' as rgb()/HSL; typos in the hex string; truncating the value when editing TOML; using a CSS variable name.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- branding.primary-color: {e}
- {e}
- distro.astrid-version {req:?} is not a valid requirement: {e
- capsule archive entry '{requested}' is not a regular file
- capsule archive contains duplicate entry '{path}'
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/ff960f93601c31c0.
Report an issue: GitHub.