Giter VIP home page Giter VIP logo

gradients_for_processing's Introduction

Hybrid Gradients Library for Processing

Radial gradients with 5%, 20%, 35%, 50% noise Radial gradients with 5%, 20%, 35%, 50% noise

Linear gradients with 5%, 20%, 35%, 50% noise Linear gradients with 5%, 20%, 35%, 50% noise

A Processing library for creating and combining gradients

  • Create custom linear, radial, noise and hybrid gradients

  • Customise the list of colours for each gradient

  • Colours can be spaced equally along the gradient or set at specific points

Example palletes.json colour list

{
  "palettes": {
    "example": {
      "path": {
        "colours": ["#200140", "#B04178", "#CF799A", "#E2CE98"],
        "stops": [0.00, 0.30, 0.60, 1.00]
      }
    }
  }
}

The gradient will default to equal spacing where no "stops" list is defined.

Example linear gradient

GradientLinear gradient = new GradientLinear(this);
gradient.setPalette("example.path");
gradient.setStart(new PVector(0, 0));
gradient.setEnd(new PVector(width, height));
gradient.setPosition(0, 0, width, height);
gradient.display();

Example radial gradient

GradientRadial gradient = new GradientRadial(this);
gradient.setPalette("example.path");
gradient.setCentre(new PVector(100, 100));
gradient.setSize(100);
gradient.setPosition(0, 0, width, height);
gradient.display();

Example noise gradient

GradientNoise gradient = new GradientNoise(this);
gradient.setPalette("example.path");
// stepX, stepY, lod, falloff
gradient.setNoiseDetails(0.01, 0.01, 8, 0.5);
gradient.setPosition(0, 0, width, height);
gradient.display();

Example hybrid gradient

gradientHybrid = new GradientHybrid(this);
gradientHybrid.setPalette("example.path");
gradientHybrid.addGradient(gradientNoise, 0.25);
gradientHybrid.addGradient(gradientRadial, 0.75);
gradientHybrid.display();

gradients_for_processing's People

Contributors

aaron-keenan avatar

Stargazers

 avatar

Watchers

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