Ensure custom subflow colors override theme overrides

Fixes #5589
pull/5599/head
Nick O'Leary 2026-03-30 18:12:13 +01:00
parent 6f3ec089db
commit 3f8dbeed8f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 5 additions and 1 deletions

View File

@ -1331,9 +1331,13 @@ RED.utils = (function() {
function getNodeColor(type, def) {
def = def || {};
if (type === 'subflow') {
// Allow a subflow instance colour to take precedence over theme if not the default color
if (/^subflow($|:)/.test(type) && def.hasOwnProperty('color') && def.color !== "#DDAA99") {
return def.color
}
if (type === 'subflow') {
type = def.type
}
if (!nodeColorCache.hasOwnProperty(type)) {
const paletteTheme = RED.settings.theme('palette.theme') || [];
if (paletteTheme.length > 0) {