nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions
+38 -43
View File
@@ -1,54 +1,63 @@
# color [![Build Status](https://travis-ci.org/Qix-/color.svg?branch=master)](https://travis-ci.org/Qix-/color)
> JavaScript library for color conversion and manipulation with support for CSS color strings.
> JavaScript library for immutable color conversion and manipulation with support for CSS color strings.
```js
var color = Color("#7743CE");
var color = Color('#7743CE').alpha(0.5).lighten(0.5);
console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)'
color.alpha(0.5).lighten(0.5);
console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ]
console.log(color.hslString()); // "hsla(262, 59%, 81%, 0.5)"
console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 }
```
## Install
```console
$ npm install color
```
## Usage
```js
var Color = require("color")
var Color = require('color');
```
### Setters
### Constructors
```js
var color = Color("rgb(255, 255, 255)")
var color = Color('rgb(255, 255, 255)')
var color = Color({r: 255, g: 255, b: 255})
var color = Color().rgb(255, 255, 255)
var color = Color().rgb([255, 255, 255])
var color = Color.rgb(255, 255, 255)
var color = Color.rgb([255, 255, 255])
```
Pass any valid CSS color string into `Color()` or a hash of values. Also load in color values with `rgb()`, `hsl()`, `hsv()`, `hwb()`, and `cmyk()`.
```js
color.red(120)
```
Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturation` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`
Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`
String constructors are handled by [color-string](https://www.npmjs.com/package/color-string)
### Getters
```js
color.hsl();
```
Convert a color to a different space (`hsl()`, `cmyk()`, etc.).
```js
color.rgb() // {r: 255, g: 255, b: 255}
color.object(); // {r: 255, g: 255, b: 255}
```
Get a hash of the rgb values with `rgb()`, similarly for `hsl()`, `hsv()`, and `cmyk()`
Get a hash of the color value. Reflects the color's current model (see above).
```js
color.rgbArray() // [255, 255, 255]
color.rgb().array() // [255, 255, 255]
```
Get an array of the values with `rgbArray()`, `hslArray()`, `hsvArray()`, and `cmykArray()`.
Get an array of the values with `array()`. Reflects the color's current model (see above).
```js
color.rgbNumber() // 16777215 (0xffffff)
```
Get the rgb number value.
```js
color.hex() // 0xffffff
```
Get the hex value.
```js
color.red() // 255
@@ -56,15 +65,13 @@ color.red() // 255
Get the value for an individual channel.
### CSS Strings
```js
color.hslString() // "hsl(320, 50%, 100%)"
color.hsl().string() // 'hsl(320, 50%, 100%)'
```
Different CSS String formats for the color are on `hexString`, `rgbString`, `percentString`, `hslString`, `hwbString`, and `keyword` (undefined if it's not a keyword color). `"rgba"` and `"hsla"` are used if the current alpha value of the color isn't `1`.
Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1.
### Luminosity
```js
color.luminosity(); // 0.412
```
@@ -76,13 +83,12 @@ color.contrast(Color("blue")) // 12
The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black).
```js
color.light(); // true
color.dark(); // false
color.isLight(); // true
color.isDark(); // false
```
Get whether the color is "light" or "dark", useful for deciding text color.
### Manipulation
```js
color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0)
@@ -91,12 +97,12 @@ color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%)
color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%)
color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%)
color.greyscale() // #5CBF54 -> #969696
color.grayscale() // #5CBF54 -> #969696
color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%)
color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%)
color.clearer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4)
color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4)
color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0)
color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%)
@@ -106,19 +112,8 @@ color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128)
color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179)
// chaining
color.green(100).greyscale().lighten(0.6)
color.green(100).grayscale().lighten(0.6)
```
### Clone
You can can create a copy of an existing color object using `clone()`:
```js
color.clone() // -> New color object
```
And more to come...
## Propers
The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus.