From b061f2ace6771816d17b821cde06d3c66ae78479 Mon Sep 17 00:00:00 2001 From: rsesek Date: Sat, 15 Jul 2006 02:23:04 +0000 Subject: [PATCH] Incoroporating a fix for three-character HEX codes git-svn-id: svn://depot/macosx/RGBConverter/trunk@241 ad1dcce9-c9fe-0310-b82b-83ea1733dbb0 --- RGB Converter.wdgt/Widget.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RGB Converter.wdgt/Widget.js b/RGB Converter.wdgt/Widget.js index 057611b..6a29338 100644 --- a/RGB Converter.wdgt/Widget.js +++ b/RGB Converter.wdgt/Widget.js @@ -83,6 +83,10 @@ function hexwatcher() { newval = newval.substr(0, 6); } + else if (length == 3) + { + newval = newval.substr(0, 1) + newval.substr(0, 1) + newval.substr(1, 1) + newval.substr(1, 1) + newval.substr(2, 1) + newval.substr(2, 1); + } else if (length < 6) { for (var i = length; i <= 6; i++) -- 2.43.5