vue-randomcolor

Tiny wrapper for integrating randomcolor into Vue.js
8,314 7
Install
npm install vue-randomcolor
Latest Version:1.0.4
License:MIT
Last Updated:Oct 21, 2024
Links: GitHub  ·  npm
Maintainer: alebeck

vue-randomcolor npm version

Tiny wrapper for integrating randomcolor into Vue.js. Less than 300 bytes minified.

Installation

Install via npm:

npm install --save vue-randomcolor randomcolor

Then you can install it as a Vue plugin:

import Vue from 'vue'
import VueRandomColor from 'vue-randomcolor'

Vue.use(VueRandomColor)

vue-randomcolor will take care of importing randomcolor automatically.

Usage

After installation, randomcolor is bound to this in every single file component:

this.$randomColor();
// outputs e.g. #ffda63

Of course, all randomcolor options can be used with the function:

this.$randomColor({ luminosity: 'light', hue: 'red' })
// outputs e.g. #f293ac

Related Packages

@apostrophecms/vue-color

Fork of vue-color that allows null values

9,228 0
vue-color-sketch

Color of Vue Components

1,882
vue-axios

A small wrapper for integrating axios to Vuejs

5,218,200 1,996
@ckpack/vue-color

(vue3.0) 🎨 Vue Color Pickers for Sketch, Photoshop, Chrome & more

3,018,652 188
vue-lodash

A small wrapper for integrating lodash into VueJs

853,868 105

Version History

Version Released License
1.0.4 MIT
1.0.3 MIT
1.0.2 MIT
1.0.1 MIT
1.0.0 MIT