From b0f1f3d326355bfd595c2c2364e12adda8a3d1c5 Mon Sep 17 00:00:00 2001 From: rsesek Date: Sun, 21 Aug 2005 06:28:06 +0000 Subject: [PATCH] Fixed weird bug (update_swatch() would update black on the first time of entering a HEX) by giving it rgb() instead of HEX# git-svn-id: svn://depot/macosx/trunk/RGB_Converter@16 ad1dcce9-c9fe-0310-b82b-83ea1733dbb0 --- RGB_Converter.wdgt/Widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGB_Converter.wdgt/Widget.js b/RGB_Converter.wdgt/Widget.js index 7815962..a8ee17a 100644 --- a/RGB_Converter.wdgt/Widget.js +++ b/RGB_Converter.wdgt/Widget.js @@ -124,7 +124,7 @@ function update_rgb() // update the colour swatch function update_swatch() { - document.getElementById("swatch").style.backgroundColor = "#" + fields['hex']; + document.getElementById("swatch").style.backgroundColor = "rgb(" + fields['red'] + ", " + fields['green'] + ", " + fields['blue'] + ")"; } // ################################################################### -- 2.22.5