Convert colors to imitate greyscale printing

后端 未结 4 1337
孤街浪徒
孤街浪徒 2021-01-21 06:07

When reading this question, I started to think whether it would be possible to convert colors to imitate an average greyscale printer (assuming that your screen is calibrated)?

4条回答
  •  情话喂你
    2021-01-21 07:01

    The desaturate() function in the `colorspace package can also be used to convert colors to their gray levels only. This collapses chroma (colorfulness) in the HCL (or polar CIELUV) representation of the colors.

    plot(1:4, type = "p",
      col = colorspace::desaturate(c(Rl, Rd, Cl, Cd)),
      pch = 19, cex = 8, xlim = c(0,5), ylim = c(0,5))
    

提交回复
热议问题