我想删除颜色的透明度,但保留颜色本身。
例如,我喜欢绿色的透明版本,但我想要这种不透明的颜色。
library(scales)
show_col("green")
Run Code Online (Sandbox Code Playgroud)

alpha("green",0.3) -> nice_green
show_col(nice_green)
Run Code Online (Sandbox Code Playgroud)

创建于 2022 年 11 月 21 日,使用reprex v2.0.2
我想过使用lightenfromcolorspace但我得到了不同的果岭。
library(colorspace)
library(scales)
lighten("green",0.3) -> not_green_I_want
show_col(not_green_I_want)
Run Code Online (Sandbox Code Playgroud)

创建于 2022 年 11 月 21 日,使用reprex v2.0.2