增加一个检查颜色转换时分量超限的错误。

This commit is contained in:
徐涛 2024-12-31 10:42:03 +08:00
parent 0c1c3ad3db
commit d8e7a33071

View File

@ -5,6 +5,8 @@ use wasm_bindgen::JsValue;
pub enum ColorError {
#[error("Invalid RGB value: {0}")]
UnrecogniazedRGB(String),
#[error("Some color component is out of bounds")]
ComponentOutOfBounds,
}
impl Into<JsValue> for ColorError {