use ribboncurls::RibboncurlsError;
use thiserror::Error;
#[non_exhaustive]
#[derive(Error, Debug)]
pub enum TintedBuilderError {
#[error("missing scheme property: {0}")]
SchemeMissingProperty(String),
#[error("unable to deserialize yaml")]
YamlDeserialize(#[from] serde_yaml::Error),
#[error("unable to render")]
RibboncurlsRender(#[from] RibboncurlsError),
#[error("unable to convert string slice to integer with given base")]
ColorRadix(#[from] std::num::ParseIntError),
#[error("hex input is not formatted correctly")]
HexInputFormat,
#[error("invalid scheme variant: {0}")]
InvalidSchemeVariant(String),
#[error("invalid scheme system: {0}")]
InvalidSchemeSystem(String),
#[error("invalid color name: {0}")]
InvalidColorName(String),
#[error("invalid color variant: {0}")]
InvalidColorVariant(String),
#[error("invalid color type: {0}")]
InvalidColorType(String),
#[error("unable to convert Color from \"{0}\" to \"{1}\"")]
ColorConversion(String, String),
#[error("unsupported color derivation: cannot derive {target} from {from_color} (supported: {supported_derivations})")]
UnsupportedColorDerivation {
from_color: String,
target: String,
supported_derivations: String,
},
#[error("unable to convert from type: {0}")]
UnableToConvertFrom(String),
}