# lighten-darken-color

> 🧬☀️This package helps you get a darker or lighter shade of any HEX color value you provide.

Latest version **1.0.0** (published 2019-09-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install lighten-darken-color
pnpm add lighten-darken-color
yarn add lighten-darken-color
bun add lighten-darken-color
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-09-06 |
| First published | 2019-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 175.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | React native Nigeria Community |
| Maintainers | reactnativeng |
| Keywords | color, HEX, react-native, react, shade |

## Links

- npm: https://www.npmjs.com/package/lighten-darken-color
- Repository: https://github.com/react-native-nigeria/Lighten-Darken-Color
- Homepage: https://github.com/react-native-nigeria/Lighten-Darken-Color#readme
- Issues: https://github.com/react-native-nigeria/Lighten-Darken-Color/issues
- npm.io page: https://npm.io/package/lighten-darken-color

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-09-06

## README

# **Lighten Darken Color**

This is a simple JavaScript helper which allow you darken or lighten a colors in your application.  This function takes colors in hex format (i.e. #F06D06, with or without hash) and lightens or darkens them with a value.

![app preview]( ./img/img1.png)



### Installation

Add lighten-darken-color to your project by executing

```javascript
$  npm install lighten-darken-color
or
$ yarn add lighten-darken-color
```



> and that's it, you're all good to go!



### Tested Platform

`lighten-darken-color` is just a javascript function and should work in any javascript project or framework. But here are a list of framework we've tested `lighten-darken-color` with, and yes it works fine!

- React Native
- Reactjs
- Vuejs

### Usage

Make sure to import the package into your project

```javascript
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import { StyleSheet, Text, View} from 'react-native'; 
import { LightenDarkenColor } from 'lighten-darken-color'; 
 
type Props = {};
export default class App extends Component<Props> {
   render() {
    return (
      <View style={styles.container}>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 10)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 40)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 60)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 80)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 100)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 140)}}> lighten-darken-color </Text>
             <Text style={{color:LightenDarkenColor('#3F6D2A', 180)}}> lighten-darken-color </Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  } 
});

```





## API's

| Name                              | Use                                                          | Default Values |
| --------------------------------- | ------------------------------------------------------------ | -------------- |
| LightenDarkenColor(color, amount) | define the color and the amount you'd like the increase or reduce | None           |

  

## Licensing

This project is licensed under MIT license.



### Don't forget to star, like and share :)

---
_Source: https://npm.io/package/lighten-darken-color · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
