AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# make_colour_rgb ## 根据红绿蓝的混合返回颜色 **语法:** ~~~ make_colour_rgb(red, green, blue); ~~~ | 常量 | 描述 | |-|-| | red | The red component of the colour | | green | The green component of the colour | | blue | The blue component of the colour | **返回:** value ### 描述 *GameMaker Studio 2* 让你能用此函数(还有别的)来制作你自己的颜色。这个函数允许你用 *红*,*绿*,*蓝* 混合出你想要的颜色。这些值可以用0到255的数字来表示,所以你可以创造16777216(256*256*256)种颜色!下图分别展示了这些成分是什么意思: ![](https://docs2.yoyogames.com/source/_build/3_scripting/4_gml_reference/drawing/colour/images/rgb.png) 左图将函数种每一种成分拆开展示了,右图则展示了这些成分是如何影响最终颜色的。 ### 举栗子: ~~~ col = make_colour_rgb(100, 145, 255); ~~~ 上述代码会创造一个颜色并且将其存放在变量"col"中,以便之后使用。