Dynamically generated, AI-resistant captcha images
Project description
color-captcha
Dynamically generated, AI-resistant captcha images.
Can you tell what time it is? AI can't.
Features:
- dynamically generated images
- rgb and grayscale color mode
- 12-hour and 24-hour clock mode
- custom colors
Installation
pip install color-captcha
Usage
from color_captcha import ClockCaptcha
captcha = ClockCaptcha()
print(captcha.value)
captcha.verify('0645') # True/False
captcha.save_image('image.png')
# generate new captcha
captcha.generate_new()
Choose between color_mode='rgb'
(color-captcha.png)
or 'grayscale'
(grayscale-captcha.png).
Pick between a 12-hour or a 24-hour clock_mode
.
from color_captcha import ClockCaptcha
captcha = ClockCaptcha(clock_mode=12)
Image size can be changed with relative size
parameter. Here are corresponding pixel values.
size | width | height |
---|---|---|
1 | 190 | 65 |
2 | 380 | 130 |
3 | 570 | 195 |
4 | 760 | 260 |
... | ... | ... |
Change colors globally:
from color_captcha import ClockCaptcha
ClockCaptcha.set_colors([
'#FFFFFF',
'#000000',
'#999999'
])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
color_captcha-0.1.4.tar.gz
(23.9 kB
view hashes)
Built Distribution
Close
Hashes for color_captcha-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aae6cd5ed9f67312af8bfcf0b820c49a0d436f25cb805b05c91da9c7effd0858 |
|
MD5 | cc486e6f915df5454de5eeefa07c8ff8 |
|
BLAKE2b-256 | ddbb35c374bbf014dc6c8f650c8d9b2dfcd0df96e08feeb6de9a94020a90637a |