Code Monkey home page Code Monkey logo

biasiolo / screen-color-button Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 67 KB

This is a jQuery plugin that enables developers to add a screen color change button to their web pages. With this plugin, users can customize the background colors of the page and add visual effects to the button.

Home Page: https://screen-color-button.vercel.app/

License: MIT License

HTML 30.92% JavaScript 40.47% CSS 28.61%
css javascript plugin switch-screens screen-color switch-color

screen-color-button's Introduction

SCREEN COLOR PLUGIN

Downloads

Elevate your website's aesthetics with the Screen Color Plugin – a robust jQuery tool that seamlessly integrates a screen color change button, bringing an engaging visual element to your web pages. he plugin now includes a button for automatic color change, cycling through colors every 2 seconds.

Explore the live example at Screen Color Button.

If you find value in this plugin, consider contributing to support ongoing enhancements. Your donation helps us maintain and improve the plugin for the community.

Donate

Donation Counter

New Features

Automatic Color Change Button The plugin now includes a button for automatic color change, cycling through colors every 2 seconds.

Code Refactoring and Cleanup

The code has been reviewed and optimized for improved readability and performance.

General Features

Manual Color Change Button

The plugin provides an interactive button allowing manual change of background colors.

Automatic Color Change Button

In addition to manual control, the plugin now includes a button to start or stop automatic color transition.

Text Color Change for Contrast

Text automatically adjusts to ensure proper contrast with the selected background color.

Customization

Background Color Adjustment

Personalize background colors to suit your preferences by adding or removing options.

Transition Time Adjustment

Configure transition times to control the speed of the animation.

Text Color Adjustment

Modify text colors to ensure optimal visibility and contrast with the selected background color.

Installation

  1. NPM:

    • Run npm install screen_color_plugin to install the plugin.
  2. Initialization:

    • Include jQuery and the plugin script in your HTML.
    • Select the desired button using jQuery and call the screenColorChange() method to activate the plugin.
    <script src="path/to/jquery.min.js"></script>
    <script src="path/to/my-plugin.js"></script>
    <script>
     $(document).ready(function () {
       $("#scrollDownButton").screenColorChange({
         colors: [
           { name: "blue", color: "rgb(43, 174, 226)" },
           { name: "green", color: "rgb(43, 226, 113)" },
           { name: "yellow", color: "rgb(177, 226, 43)" },
           { name: "purple", color: "rgb(159, 43, 226)" },
           { name: "red", color: "rgb(214, 40, 40)" },
           { name: "black", color: "#080808" },
         ],
       });
    
       var autoChangeEnabled = false;
    
       $("#autoColorChangeSwitch").on("click", function () {
         autoChangeEnabled = !autoChangeEnabled;
    
         if (autoChangeEnabled) {
           // Inicie a mudança automática de cor
           startAutoColorChange();
         } else {
           // Pare a mudança automática de cor
           stopAutoColorChange();
         }
       });
    
       function autoChangeColor() {
         setInterval(function () {
           $("#scrollDownButton").click();
         }, 2000); // Mude a cor a cada 2 segundos
       }
    
       // Adicione esta função para parar a mudança automática de cor
       function stopAutoColorChange() {
         console.log("Parando a mudança automática de cor");
       }
     });
</script>

User Experience

Immerse your users in an interactive journey with the Screen Color Plugin. Create a visually appealing website that leaves a lasting impression.

Contribution

Feel free to contribute with improvements, bug fixes, or new features. Open an issue or submit a pull request! Drop a message and let us know how you're using it! Let's collaborate!

Support

For support, send me an email.

License

This project is licensed under the MIT License, by Biasiolo.

screen-color-button's People

Contributors

biasiolo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.