Giter Site home page Giter Site logo

jream / svg-curved-backgrounds Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 4.0 595 KB

I can't find this anywhere so here is a demo, clone or grab the images to get started they scale nice. Any advice to color better is appreciated (besides filter)

Home Page: https://jream.com

License: MIT License

CSS 50.65% HTML 49.35%
svg background curved css scss 2019 wavy waves

svg-curved-backgrounds's Introduction

Wavy BG

Here are four resizable/colorable SVG backgrounds with the 2019 trending curve. Free for all, hope it helps. If you want to setup and customize you need NodeJS.



preview


Paths and Files

This all may not be necessary. You can just download the images where they are located below, do what you please if you enjoy! You do not have to "credit Jesse", It took a few minutes to draw, the license is to stay out of trouble -- who knows what goes on the interwebs anymore.

  • src/
    • assets/
      • images/
        • bg-inward-deep.svg
        • bg-inward.svg
        • bg-outward.svg
        • bg-wave.svg
      • styles
        • _normalize.scss -- This isn't needed here, it's just for demo's.
        • main.scss -- This is really all you need (the dist) folder will have an uncompressed CSS copy.
    • index.html -- This is the entrypoint for Parcel which includes the main.scss file, and ends up in ./dist/main.css.

The SVG Images

In each SVG, they contain the same class="bg-<name>, remove or adjust how you like.

If you wanted to manually add CSS within the SVG, you would add <defs><style>... like below, and add a class to the svg path.

  <defs>
    <style>.bg-outward {fill:red;}</style>
  </defs>
  <path class="bg-outward" ... />

Colorizing the SVG

You can use the filter property, or probably CSS masks.

filter: hue-rotate(40deg) saturate(0.5) brightness(390%) saturate(4);

(Optional) Build and Bundle

I added Parcel Bundler to turn out SCSS and any assets because it's simple with zero-configuration.

Install Bundler

yarn
npm i

Running the Transpiler

By default, this runs at: http://localhost:1234

yarn develop  # ( alias: yarn start )
yarn build

npm run develop  # ( alias: npm run start )
npm run build

In Windows you may need to change $npm_package_main to %npm_package_main%, I'm chilling with Ubuntu.


Open Source MIT

&copy 2019 Jesse Boyer <https://jream.com>

svg-curved-backgrounds's People

Contributors

jream avatar

Stargazers

 avatar  avatar

Watchers

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