From: David Mazary Date: Sun, 18 Mar 2012 18:38:28 +0000 (-0300) Subject: fix typos X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=997e49e6c0f568a1e779492832f6e5356fabed98;p=xonotic%2Fxonstat.git fix typos --- diff --git a/xonstat/util.py b/xonstat/util.py index 0afa654..57fd54f 100755 --- a/xonstat/util.py +++ b/xonstat/util.py @@ -60,7 +60,7 @@ _dec_colors = re.compile(r'\^(\d)') _hex_colors = re.compile(r'\^x([\dA-Fa-f])([\dA-Fa-f])([\dA-Fa-f])') # On a light scale of 0 (black) to 255 (white) -_contrash_threshold = 128 +_contrast_threshold = 128 def qfont_decode(qstr=''): @@ -87,10 +87,10 @@ def hex_repl(match): g = match.group(2) * 2 b = match.group(3) * 2 hue, light, satur = rgb_to_hls(int(r, 16), int(g, 16), int(b, 16)) - if light < _contrash_threshold: - light = _contrash_threshold + if light < _contrast_threshold: + light = _contrast_threshold r, g, b = hls_to_rgb(hue, light, satur) - return ''.format(r, g, b) + return ''.format(r, g, b) def html_colors(qstr=''):