diff options
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources/firewall.js')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/firewall.js | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/firewall.js b/modules/luci-base/htdocs/luci-static/resources/firewall.js index b1c7de4358..2e032ca2d5 100644 --- a/modules/luci-base/htdocs/luci-static/resources/firewall.js +++ b/modules/luci-base/htdocs/luci-static/resources/firewall.js @@ -57,21 +57,7 @@ function getColorForName(forName) { else if (forName == 'wan') return '#f09090'; - random.seed(parseInt(sfh(forName), 16)); - - var r = random.get(128), - g = random.get(128), - min = 0, - max = 128; - - if ((r + g) < 128) - min = 128 - r - g; - else - max = 255 - r - g; - - var b = min + Math.floor(random.get() * (max - min)); - - return '#%02x%02x%02x'.format(0xff - r, 0xff - g, 0xff - b); + return random.derive_color(forName); } |