com.dss.color-palettes
v1.3.2
Published
A way to keep color styles consistant throughout a project.
Downloads
31
Maintainers
Readme
Color Palettes
A system to keep UnityEngine.Graphic colors consistent throughout a project.
Example
In this palette, I've declared three name-color pairs corresponding to the background, text, and an accent color. You can add as many name-color pairs, but the names should be unique from each other.
In this palette container, I've added the dark theme from before, as well as other themes. I can easily swap between them by checking the appropriate box (as well as through custom scripts).
I've added an
ApplyColorPalette
component toImage
component, and set it to use the "accent" color from the previous palette container. Notice that the container itself acts as a palette. (We could have just as easily dropped in a single color palette instance as well).
Demo
How To Install
The color-palettes package uses the scoped registry feature to import
dependent packages. Please add the following sections to the package manifest
file (Packages/manifest.json
).
To the scopedRegistries
section:
{
"name": "DSS",
"url": "https://registry.npmjs.com",
"scopes": [ "com.dss" ]
}
To the dependencies
section:
"com.dss.color-palettes": "1.3.2"
After changes, the manifest file should look like below:
{
"scopedRegistries": [
{
"name": "DSS",
"url": "https://registry.npmjs.com",
"scopes": [ "com.dss" ]
}
],
"dependencies": {
"com.dss.color-palettes": "1.3.2",
...