From e74244276a19b6a9b37f58d9ea31c7ec71160f66 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@16 ad1dcce9-c9fe-0310-b82b-83ea1733dbb0 --- RGB_Converter/RGB_Converter.wdgt/Widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RGB_Converter/RGB_Converter.wdgt/Widget.js b/RGB_Converter/RGB_Converter.wdgt/Widget.js index 7815962..a8ee17a 100644 --- a/RGB_Converter/RGB_Converter.wdgt/Widget.js +++ b/RGB_Converter/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.43.5