Index: modules/user/user.js =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.js,v retrieving revision 1.18 diff -u -p -r1.18 user.js --- modules/user/user.js 21 Sep 2009 08:52:41 -0000 1.18 +++ modules/user/user.js 21 Sep 2009 14:19:58 -0000 @@ -52,9 +52,11 @@ Drupal.behaviors.password = { // Adjust the length of the strength indicator. $('#indicator').css('width', result.strength + '%'); + $('#indicator').css('background-color', result.indicatorColor); // Update the strength indication text. - $("#password-strength-text").html(result.indicatorText); + $('#password-strength-text').html(result.indicatorText); + $('#password-strength-text').css('color', result.indicatorColor); passwordCheckMatch(); }; @@ -162,17 +164,21 @@ Drupal.evaluatePasswordStrength = functi // Based on the strength, work out what text should be shown by the password strength meter. if (strength < 60) { indicatorText = translate.weak; + indicatorColor = '#bb5555'; } else if (strength < 70) { indicatorText = translate.fair; + indicatorColor = '#bbbb55'; } else if (strength < 80) { indicatorText = translate.good; + indicatorColor = '#4863a0'; } else if (strength < 100) { indicatorText = translate.strong; + indicatorColor = '#47C965'; } // Assemble the final message. msg = translate.hasWeaknesses + ''; - return { strength: strength, message: msg, indicatorText: indicatorText } + return { strength: strength, message: msg, indicatorText: indicatorText, indicatorColor: indicatorColor } };