Giter Site home page Giter Site logo

color4bg.js's Introduction

color4bg.js

color4bg.js

generate dynamic, abstract, and visually stunning background images for your web pages using WebGL and JavaScript.

Demo

Please visit: color4bg.com

color4bg.js

Features

  • Customizable Colors: You can specify an array of up to 6 colors that will be used to generate the background pattern.
  • Dynamic Animation: The generated background can be set to loop, creating a mesmerizing, fluid animation.
  • Consistent Patterns: By providing a seed value, you can ensure that the same pattern is generated every time, making it easy to integrate into your web design.
  • Easy Integration: Simply import the **Bg class and create an instance with your desired settings.

Usage

To use color4bg.js, follow these steps:

  1. Import the AbstractShapeBg module:
import { AbstractShapeBg } from "../build/jsm/AbstractShapeBg.module.js"
  1. Create an instance of AestheticFluidBg (or any other Bg) with your desired settings:
let colorbg = new AestheticFluidBg({
    dom: "box",
    colors: ["#D1ADFF", "#98D69B", "#FAE390", "#FFACD8", "#7DD5FF", "#D1ADFF"],
    seed: 1000,
    loop: true
})
  • dom: The DOM element where the background should be attached.
  • colors: An array of up to 6 hexadecimal color values.
  • seed: A numerical value used to generate a consistent pattern.
  • loop: A boolean value that determines whether the background should loop or not.

License

This project is licensed under the MIT License.

color4bg.js's People

Contributors

winterx 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.