[BugFix] Fix node color for custom light themes (#2621)
Co-authored-by: github-actions <github-actions@github.com>
@@ -152,6 +152,7 @@ test.describe('Color Palette', () => {
|
||||
// doesn't update the store immediately.
|
||||
await comfyPage.setup()
|
||||
|
||||
await comfyPage.loadWorkflow('every_node_color')
|
||||
await comfyPage.setSetting('Comfy.ColorPalette', 'obsidian_dark')
|
||||
await expect(comfyPage.canvas).toHaveScreenshot(
|
||||
'custom-color-palette-obsidian-dark.png'
|
||||
@@ -232,7 +233,7 @@ test.describe('Node Color Adjustments', () => {
|
||||
const workflow = await comfyPage.page.evaluate(() => {
|
||||
return localStorage.getItem('workflow')
|
||||
})
|
||||
for (const node of JSON.parse(workflow).nodes) {
|
||||
for (const node of JSON.parse(workflow ?? '{}').nodes) {
|
||||
if (node.bgcolor) expect(node.bgcolor).not.toMatch(/hsla/)
|
||||
if (node.color) expect(node.color).not.toMatch(/hsla/)
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 135 KiB |
@@ -27,6 +27,7 @@ import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { useWidgetStore } from '@/stores/widgetStore'
|
||||
import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||
import { useColorPaletteStore } from '@/stores/workspace/colorPaletteStore'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import type { ComfyNodeDef } from '@/types/apiTypes'
|
||||
import type { ComfyExtension, MissingNodeType } from '@/types/comfy'
|
||||
@@ -650,7 +651,7 @@ export class ComfyApp {
|
||||
const opacity = useSettingStore().get('Comfy.Node.Opacity')
|
||||
if (opacity) adjustments.opacity = opacity
|
||||
|
||||
if (useSettingStore().get('Comfy.ColorPalette') === 'light') {
|
||||
if (useColorPaletteStore().completedActivePalette.light_theme) {
|
||||
adjustments.lightness = 0.5
|
||||
|
||||
// Lighten title bar of colored nodes on light theme
|
||||
|
||||