-
-
Notifications
You must be signed in to change notification settings - Fork 26
Themes
By default, IconCaptcha includes 2 themes: light
and dark
. These themes have been designed in such a way that they seamlessly blend with a wide range of website designs.
To register your custom theme, you need to configure it in the configuration (check the themes
option). For each custom theme, you must provide an icon color and an icon separator color. The following example code demonstrates the registration of a custom theme named black
.
<?php
return [
...
// Configurations for additional custom themes.
'themes' => [
'black' => [
// Specifies which icon type should be used: light or dark.
'iconStyle' => 'light',
// Specifies the RGB color of the icon separator.
'separatorColor' => [20, 20, 20],
],
],
...
]);
?>
The icons used in this project are made by BlendIcons, and in particular, their Light icon set is used. When adding additional icons, ensure they have a dimension of 30x30 and are in True color format. In total, IconCaptcha comes with 250 icons and you have the flexibility to add your own.
By default, the icon theme colors light
and dark
are available. The icons can be found in the /dist/icons
folder of the client-side package, or the /assets/icons
folder of the PHP package. If you wish to add any other icon color, you must copy all the icons from either the light
or dark
folder to a new folder, and use photo editing software to change the icons into your desired color. You may also download the custom collection of icons directly from their website.
For reference:
- Captcha theme
light
uses thelight
icon set, which contains black icons. - Captcha theme
dark
uses thedark
icon set, which contains white icons.
IconCaptcha 4
- Getting Started
- Implementation
- Configuration
- Storage
- Session
- Challenge Generator
- Validation
- Hooks & Events
- Token
- Themes
- Localization
IconCaptcha 3 (outdated)