颜色的使用
-
介绍
在创益编程的游乐场中,你可以用调色板来指定一种颜色。在调色板中,用滑块做大的改动,用上下箭头做微调,点一下就加减1。

接下来说说每个数值的含义:
颜色
你可以利用色值选择主要颜色主题。下面是8种常见颜色的色值。其它任意一个色值都是2个相邻色值的组合。

饱和度
饱和度控制颜色的强度。若饱和度为0,就是空白(没有颜色);若为100,就是全色。

亮度
亮度控制颜色的明暗程度。有一些常用的饱和度。当亮度为0,颜色就是黑色。

透明度
透明度控制的是透过一个图形能看到多少。当透明度为100,根本就看不到这个颜色了。下面这些圆圈有着不同的透明度:

积木:颜色
你可以用这个积木重现任意一种颜色。4个输入值的原理和调色板中的4个滑块一样:

范例:随机颜色
利用这个颜色积木,很容易生成特定范围内的随机颜色。比如,假定你要用一种随机蓝色打印“你好”这个词,就可以让颜色和饱和度生成随机值,如下所示:

输出结果如下:

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login