【发布时间】:2014-01-08 01:42:52
【问题描述】:
在阅读this question 时,我开始思考是否可以转换颜色以模仿普通的灰度打印机(假设您的屏幕已校准)?找到一个可以接受的近似值会节省纸张。
例如,如何转换这些颜色,看看在纸上是否可以区分浅蓝色和深蓝色和红色?
temp <- rgb2hsv(239, 138, 98, maxColorValue=255)
Rl <- hsv(h = temp[1,], s = 0.5, v = 1)
Rd <- hsv(h = temp[1,], s = 0.5, v = 0.4)
temp <- rgb2hsv(103, 169, 207, maxColorValue=255)
Cl <- hsv(h = temp[1,], s = temp[2,], v = 1)
Cd <- hsv(h = temp[1,], s = temp[2,], v = 0.4)
plot(1:4, type = "p", col = c(Rl, Rd, Cl, Cd), pch = 19, cex = 8, xlim = c(0,5), ylim = c(0,5))
【问题讨论】:
-
如果你在 hsv 中工作,你可以将饱和度设置为零以转换为灰度。
-
如果您希望在灰度模式下人类无法区分颜色,请使用 hcl 调色板,并将色度设置为零。
-
在 hsv 刻度上将饱和度设置为 0 会使
Rl消失,但如果您尝试使用灰度打印机打印绘图,则不会。也许打印机调整了颜色?