脚本/功能 【更新】Semantic Color Palette 1.1.1色彩管理系统

Unity插件信息
插件名称: Semantic Color Palette
插件官网: https://assetstore.unity.com/packages/tools/utilities/semantic-color-palette-228927
版本: 1.1.1
解压密码:
素材类型: 脚本/功能
本帖最后由 微笑的猫 于 2024-12-2 16:17 编辑


Semantic Color Palette 1.1.2版下载链接
















This package provides a semantic color management system for Unity.
The best way to get a glimpse of the system in action is trying the online demo, but the videos work too!
So, what is semantic color management?
Basically, you define a set of meaningful identifiers for colors, representing where/how each color is used (e.g. "buttonBackground"), and not the colors themselves (e.g. "darkBrown").
Then, elsewhere, you map each idenfier to an actual color value.
The elements where colors are to be applied never directly refer to actual, specific colors, but only to semantic color ids.
This decoupling allows to quickly and flawlessly change colors to multiple elements in a centralized way, and to easily implement some form of "color skinning" by applying different id -> color mappings.

How does this system work in practice?
There are three core elements that work together to achieve its design goals:
Palette: a named set of id -> color mappings. It is a "data" element, usually persistent.
Palette provider: an active element, living in a Unity scene, that acts as a broker between palettes and colorers, pushing color updates to any relevant colorers.
Colorer: an active element that contains the logic to apply one or more colors to a scene component (UI elements, 3D models materials and more). A colorer must be connected to a palette provider, from which it retrieves colors for the color identifiers specified in its configuration.
Ready to use Colorers for Unity components using color properties (UI elements, Materials etc) are included. That said, programmers can easily extend the system with additional custom colorers (and providers).

You can improve your workflow with a new, more reasonable way to setup colors in Unity, with low friction and no compromises on your project organization.
Anything can be done through the inspector if you want, but it's also easy to use the system through code only if you prefer.
Palettes can be imported from commonly used third party formats and edited in the inspector, and in more advanced scenarios can be loaded at runtime from external files.
The asset contents are laid out to be easily packaged for use in the Package Manager, if you want to easily import it (maybe including your own customizations) from multiple projects.


该软件包为 Unity 提供了一个语义色彩管理系统。
了解系统运行情况的最佳方式是尝试在线演示,但视频也可以!
那么,什么是语义色彩管理呢?
基本上,您要为颜色定义一组有意义的标识符,代表每种颜色的使用位置和方式(例如 "buttonBackground"),而不是颜色本身(例如 "darkBrown")。
然后,在其他地方将每个标识符映射到实际的颜色值。
要应用颜色的元素永远不会直接引用实际的特定颜色,而只会引用语义上的颜色 id。
这种解耦允许以集中的方式快速、完美地更改多个元素的颜色,并通过应用不同的 id -> 颜色映射,轻松实现某种形式的 "颜色换肤"。

这个系统是如何实际运作的?
有三个核心元素共同实现其设计目标:
调色板:一组已命名的 ID -> 颜色映射。它是一个 "数据 "元素,通常是持久的。
调色板提供者:存在于 Unity 场景中的活动元素,它充当调色板和调色器之间的中介,将颜色更新推送给任何相关的调色器。
着色器:一种活动元素,包含将一种或多种颜色应用到场景组件(用户界面元素、三维模型材质等)的逻辑。着色器必须连接到调色板提供程序,从中获取其配置中指定的颜色标识符的颜色。
使用颜色属性(用户界面元素、材质等)的 Unity 组件都包含了现成可用的调色板。尽管如此,程序员仍可使用其他自定义调色板(和提供程序)轻松扩展系统。

您可以通过一种新的、更合理的方式在 Unity 中设置颜色,从而改善工作流程,减少摩擦,并且不会影响您的项目组织。
任何事情都可以通过检查器完成,但如果您愿意,也可以只通过代码轻松使用该系统。
调色板可以从常用的第三方格式导入并在检查器中编辑,在更高级的情况下,还可以在运行时从外部文件加载。
如果你想从多个项目中轻松导入资产(可能包括你自己的定制),资产内容的布局很容易打包,以便在打包管理器中使用。





作者 cg小白兔 发表于 2024-3-7 14:13:15
您需要登录后才可以回帖 登录 | 立即注册
cg小白兔

关注0

粉丝0

发布7457

热门作品推荐
glow
中国古风家具30个中式古代灯笼吊灯宫灯台灯
glow
Frozen GUI Pack 1.7 冬季冰雪主题游戏UI界
glow
中国风古典边框中式花纹样祥云PSD图案PNG素
glow
Sand VFX 适配UE5.0+风沙漠沙子撞击沙地冲
glow
Voyager Third Person Shooter V2 2.0.1 适
glow
Tornado Generator - Niagara Fluids 适配U
glow
Nuclear winter 适配UE5.2+末日后世界苏联
glow
Snapping Helper 1.41 适配UE5.5
glow
High school Science Lab Classroom - 90&#
glow
Survival Man 适配UE5.5+生存游戏男性幸存