Linux 软件免费装
Banner图

Shilpi Color Modes: Dark Mode, Light Mode & Color Switcher

开发者 fmojibur
更新时间 2026年11月25日 21:19
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

dark mode night mode light mode dark theme color switcher

下载

1.0.0

详情介绍:

Shilpi Color Modes adds a real dark mode (or light mode) to any WordPress site, built from your own colors. https://www.youtube.com/watch?v=XtN1LaYIZmA Most dark mode plugins invert or filter your colors automatically. That often breaks logos, photos, gradients and brand colors, and the result looks cheap. Shilpi Color Modes works the other way: you choose exactly which color replaces which. Your background #FFFFFF becomes #0F1318, your brand blue becomes a lighter blue that reads well on dark, and everything else stays as you designed it. It works with any theme and any page builder, because it changes colors on the finished page: theme CSS, Elementor and Gutenberg global colors, CSS variables, inline styles and SVG icons. Main features Works with Elementor, Gutenberg and block themes (Full Site Editing), Divi, Bricks, Breakdance, Oxygen, Beaver Builder, WPBakery, Shilpi, Astra, Kadence, GeneratePress, Hello Elementor, WooCommerce and custom HTML pages. Page builder editors always show your original design. How to add dark mode to your site
  1. Go to Appearance > Color Modes.
  2. Choose whether your current design is light or dark.
  3. Open the Colors tab and click Scan page.
  4. Click the colors you want to change. A matching color for the other mode is suggested for each one.
  5. Mark your page background color, check the contrast badges, and save.
  6. Preview with the Preview dark and Preview light buttons.
Made by Shilpi Builder.

安装:

  1. Install the plugin from Plugins > Add New (search for "Shilpi Color Modes") or upload the zip file.
  2. Activate it.
  3. Go to Appearance > Color Modes and follow the setup checklist.

屏幕截图:

  • Colors: scan a page, import Elementor or theme colors and build your color pairs with contrast checks.
  • Toggle: floating switch styles, position and placement options.
  • Advanced: visitor memory, image dimming, exclusions, import and export.
  • The same site in light mode and dark mode.

升级注意事项:

1.0.0 First public release.

常见问题:

How do I add a dark mode toggle to my WordPress site?

Turn on the floating toggle in Appearance > Color Modes > Toggle, or place it yourself with the [shilpi_color_toggle] shortcode, the "Dark Mode Toggle" block, the "Dark Mode Toggle" Elementor widget, or a menu location.

How do I add a dark mode toggle in Elementor?

Search for "Dark Mode Toggle" in the Elementor widget panel and drag it into your header or any section.

My site is already dark. Can I add a light mode?

Yes. Choose "Dark design" in the Overview tab. The plugin then creates the light mode from your color pairs.

Does it invert my colors or images?

No. Only the colors you list are replaced. Images are never inverted. You can optionally dim photos a little in dark mode.

How do I show a different logo in dark mode?

Add both logos next to each other. Give the normal logo the class scm-show-light and the white logo the class scm-show-dark. In Elementor use Advanced > CSS Classes. Only the logo for the active mode is shown.

Can I keep one section exactly as it is?

Yes. Add the class scm-no-swap to it, or list its selector under Advanced > Exclusions. Note that hover colors and ::before / ::after decorations inside that section can still change if they use a swapped color.

Can visitors choose automatic mode that follows their phone or computer?

Yes. Set "Visitors see first" to Automatic. The toggle works at any time. By default a toggle choice lasts while the visitor browses your site; turn on Smart memory to keep it for future visits. Either way, if the device later switches between light and dark (for example a phone that turns dark at night), the site follows the device again. This smart memory means visitors never get stuck in the wrong mode.

Will it slow down my site?

No. The bootstrap script is under 1 KB, the engine is a small file loaded in the footer, and there are no external requests.

Does it work with caching plugins?

Yes. The mode is chosen in the browser, so cached pages work. The plugin also excludes its tiny head script from JS delay and defer in WP Rocket, LiteSpeed Cache, Autoptimize, Perfmatters and SiteGround Optimizer.

Some colors are not changing. What can I do?

Scan the page again and add the missing color. If your theme uses many slightly different shades, raise the "Color matching tolerance" slider in the Colors tab. Stylesheets loaded from another domain are swapped too when that server allows it.

How do I preview a mode without the toggle?

Add ?color-mode=dark or ?color-mode=light to any URL on your site.

Is there a JavaScript API?

Yes. ShilpiColorModes.get(), ShilpiColorModes.set( 'dark' ), ShilpiColorModes.toggle() and ShilpiColorModes.reset(). Listen for changes with document.addEventListener( 'scm:change', function ( e ) { console.log( e.detail.mode ); } ).

更新日志:

1.0.0