1.0.2 • Published 2 years ago

generate-random-gradient v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

random-gradient-generator 🎨

Generate beautiful linear gradients with randomly generated hex values.

gradient-random

No dependencies!

Installation

npm install --save generate-random-gradient

Usage

const gradient = require("generate-random-gradient");

gradient(); // => 'linear-gradient(29deg, #a2075c, #a0e60e)'
gradient(); // => 'linear-gradient(256deg, #9783fd, #e3b03e)'

Usage in Vue (in app.vue for example):

<script setup>
  import gradient from "generate-random-gradient"; function applyGradient(e) {
      e.target.style.background = gradient();
  }
</script>

<template>
<div id="app">
    <button @click="applyGradient">Hello!</button>
</div>
</template>

License

MIT

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with 💛 by Nazneen Oomatia (GitHub).