Library to grab all conceivable UI colors from any Adobe application and expose them as dynamic CSS variables which update automatically to any user-defined theme or theme changes.
App | Illustrator | After Effects | Photoshop | Premiere Pro | InDesign | Audition |
---|---|---|---|---|---|---|
Support | 100% | 100% | 98%* | 98%* | 98%* | 98%* |
Theme Type | 4-tier | Gradient | 4-tier | Gradient | 4-tier | Gradient |
* Base calculations done in Illustrator and After Effects. If you notice inaccuracies in other apps, let me know and I'll update them.
• Getting Started
• Stylesheets
The panel in the center is UI Spy. Notice the variables changing value on the left during app theme changes, and the panel's elements being automatically recolored in the center. There's no manual handling at all -- each element has a single CSS variable and never needs to care about user theme ever again.
After Effects is far more consistent than other apps with it's color scheme. Notice the hover state of buttons is the same as the color of it's default text -- the button text should invert:
Templates from generator-cep-vue-cli already include starlette
Install the package from NPM:
npm install starlette
Now import starlette
and call the init()
function anywhere in your panel:
<!-- In a .vue file -->
<script>
import starlette from 'starlette'
// Or via require:
const starlette = require('starlette').default;
export default {
name: 'yourComponent',
mounted() {
starlette.init();
// Now all CSS variables are exposed and reactive.
// Can also do import and init all at once:
require('starlette').default.init();
},
}
This gives you the freedom to write concise CSS with no need for any logic about the theme, simply assign the appropriate color:
.checkbox {
/* This takes care of every theme, matching the host app exactly */
fill: var(--color-checkbox);
}
/* Easily apply the hover state with a single line of CSS via the hover variable */
.checkbox:hover {
fill: var(--color-checkbox-hover);
}
.checkbox-disabled {
fill: var(--color-checkbox-disabled);
}
This is the literal CSS from the screen capture above, located in UI Spy's components/preview/checkbox.vue file.
init()
should assign low-specificity base rules likefont-family: 'Open Sans', sans-serif;
, assign the<body>
tag'sbackground-color
to--color-bg
, and automatically assign the scrollbar's style.Support all other apps (6 minimum to cover Typescript / Ovid Editor)Extend API and documentation
- Gradient buttons work much differently -- might be worth having a
button-text
variable - Photoshop's
dropdown
is anomalously white, causing the text to be unreadable -- maybe include adropdown-text
variable to combat this - There should be a
input-disabled
variable