diff --git a/src/geom/paint.rs b/src/geom/paint.rs index 7342024c3..8dee363cc 100644 --- a/src/geom/paint.rs +++ b/src/geom/paint.rs @@ -229,7 +229,7 @@ impl CmykColor { impl Debug for CmykColor { fn fmt(&self, f: &mut Formatter) -> fmt::Result { - let g = |c| c as f64 / 255.0; + let g = |c| 100.0 * (c as f64 / 255.0); write!( f, "cmyk({:.1}%, {:.1}%, {:.1}%, {:.1}%)", diff --git a/src/library/utility.rs b/src/library/utility.rs index ca9d43508..4fb254de7 100644 --- a/src/library/utility.rs +++ b/src/library/utility.rs @@ -118,7 +118,8 @@ pub fn rgb(_: &mut EvalContext, args: &mut Args) -> TypResult { }, )) } -/// Create an CMYK color. + +/// Create a CMYK color. pub fn cmyk(_: &mut EvalContext, args: &mut Args) -> TypResult { struct Component(u8);