Skip to content

Commit

Permalink
Fix cmyk calculations
Browse files Browse the repository at this point in the history
B (blue) value was calculated with m (magenta) value instead of k (black)
  • Loading branch information
harrrson authored Dec 29, 2023
1 parent c9bfdeb commit 97f0fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dpp/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ uint32_t rgb(int red, int green, int blue) {
uint32_t cmyk(double c, double m, double y, double k) {
int r = (int)(255 * (1 - c) * (1 - k));
int g = (int)(255 * (1 - m) * (1 - k));
int b = (int)(255 * (1 - y) * (1 - m));
int b = (int)(255 * (1 - y) * (1 - k));
return rgb(r, g, b);
}

Expand Down

0 comments on commit 97f0fe9

Please sign in to comment.