Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

ColorPalette

继承: Resource < RefCounted < Object

用于管理调色板的资源类,可以用 ColorPicker 来加载和保存。

描述

ColorPalette 资源可用于存储和管理颜色的合集。常用于需要一组预设颜色的场景,例如创建主题、设计用户界面、管理游戏资产等。内置的 ColorPicker 控件无需额外编写代码就可以使用 ColorPalette

属性

PackedColorArray

colors

PackedColorArray()


属性说明

PackedColorArray colors = PackedColorArray() 🔗

包含调色板中颜色的 PackedColorArray

Note: The returned array is copied and any changes to it will not update the original property value. See PackedColorArray for more details.