summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-10 10:05:43 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-10 10:05:43 +0100
commit6e198bf7606847b0847487a4847d6a3ee3621d2d (patch)
tree0609efafa0836495373f5fbe36a0d8eb999e2fe4 /src
parented1197a3db0f8e9df4e76ddaa2ab27242053faee (diff)
Fix CMYK formatting
Diffstat (limited to 'src')
-rw-r--r--src/geom/paint.rs2
-rw-r--r--src/library/utility.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/geom/paint.rs b/src/geom/paint.rs
index 7342024c..8dee363c 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 ca9d4350..4fb254de 100644
--- a/src/library/utility.rs
+++ b/src/library/utility.rs
@@ -118,7 +118,8 @@ pub fn rgb(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> {
},
))
}
-/// Create an CMYK color.
+
+/// Create a CMYK color.
pub fn cmyk(_: &mut EvalContext, args: &mut Args) -> TypResult<Value> {
struct Component(u8);