Fix invisible text

Text can become invisible during image.paste if color=(0,0,0)
This commit is contained in:
Vladimir Yakovlev
2017-11-11 14:25:37 +03:00
parent 87c165926c
commit c12119b3e2

View File

@@ -222,7 +222,7 @@ class ImageCaptcha(_Captcha):
:param chars: text to be generated.
"""
background = random_color(238, 255)
color = random_color(0, 200, random.randint(220, 255))
color = random_color(10, 200, random.randint(220, 255))
im = self.create_captcha_image(chars, color, background)
self.create_noise_dots(im, color)
self.create_noise_curve(im, color)