From 3039a8a8d178027c6edafc772ffce2a9928e04e5 Mon Sep 17 00:00:00 2001 From: Raykosan <71210053+Raykosan@users.noreply.github.com> Date: Sun, 5 Jul 2026 16:25:42 +0300 Subject: [PATCH] Correcting the color selection in the RS Colorpicker node --- __init__.py | 2 +- package.json | 2 +- pyproject.toml | 2 +- web/rs_colorpicker.js | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 670ef80..96f0ce6 100644 --- a/__init__.py +++ b/__init__.py @@ -29,7 +29,7 @@ IGNORED_MODULES: Set[str] = {'__init__.py'} REQUIRED_MODULES: Set[str] = set() PACKAGE_DISPLAY_NAME = "ComfyUI_RaykoStudio" -__version__ = "0.26.0" +__version__ = "0.26.1" def load_modules(): print(f"🦊 {PACKAGE_DISPLAY_NAME}: Version: {__version__}") diff --git a/package.json b/package.json index ab8e710..47dd64e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ComfyUI_RaykoStudio", - "version": "0.26.0", + "version": "0.26.1", "description": "Set of custom nodes for ComfyUI providing additional image processing capabilities", "author": "Raykosan", "license": "Apache License 2.0", diff --git a/pyproject.toml b/pyproject.toml index ad5b444..0cf6c30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI_RaykoStudio" description = "Set of custom nodes for ComfyUI providing additional image processing capabilities" -version = "0.26.0" +version = "0.26.1" license = { file = "LICENSE" } dependencies = ["torch", "numpy", "Pillow>=10.0.0", "freetype-py>=2.5.1", "pycairo>=1.29.0", "scipy>=1.10.0"] diff --git a/web/rs_colorpicker.js b/web/rs_colorpicker.js index 7cd5bd7..32092ee 100644 --- a/web/rs_colorpicker.js +++ b/web/rs_colorpicker.js @@ -367,11 +367,29 @@ app.registerExtension({ if (node.graph) node.graph.setDirtyCanvas(true, true); }; + let isColorPickerOpen = false; + colorInput.addEventListener("input", (e) => { + const color = normalizeHex(e.target.value); + swatch.style.background = color; + hexInput.value = color.toUpperCase(); + isColorPickerOpen = true; + }); + + colorInput.addEventListener("change", (e) => { const color = normalizeHex(e.target.value); swatch.style.background = color; hexInput.value = color.toUpperCase(); syncOutputs(color); + isColorPickerOpen = false; + }); + + document.addEventListener("mouseup", () => { + if (isColorPickerOpen) { + const color = normalizeHex(colorInput.value); + syncOutputs(color); + isColorPickerOpen = false; + } }); hexInput.addEventListener("change", (e) => {