Git Product home page Git Product logo

color-repo-doc's Introduction

*IMPORTANT: If you're using v1.0.0 of color-repo-kim in an ES6 environment and encountering the 'Cannot use import outside a module' error, please run npm install color-repo-kim@latest to resolve the issue and install the latest version (v2.0.0).

Color Repo Kim Official Docs

this readme is still a work in progress. Some info might be out of place

Color Repo is a lightweight JavaScript library for seamless color manipulation and analysis. It provides a collection of methods to manipulate, analyze, and convert colors easily.

Installation

npm install color-repo-kim

or using cdn.jsdelivr.:

https://cdn.jsdelivr.net/npm/[email protected]

Usage

Basic Example

const { ColorRepoKim  } = require('color-repo-kim');

// Define a sample color
const sampleColor = { r: 255, g: 0, b: 0 };

// Get the complementary color
const complementaryColor = ColorRepoKim .manipulate.getComplementaryColor(sampleColor);

// Display results
console.log('Sample Color:', sampleColor);
console.log('Complementary Color:', complementaryColor);`

Expected output:

Sample Color: { r: 255, g: 0, b: 0 }
Complementary Color: { r: 0, g: 255, b: 255 }`

Advanced Features

ColorRepoKim includes a variety of color manipulation features:

  • Get Split Complementary Colors
const splitComplementaryColors = ColorRepoKim .manipulate.getSplitComplementaryColors(sampleColor);
console.log('Split Complementary Colors:', splitComplementaryColors);`
  • Get Analogous Colors
const analogousColors = ColorRepoKim .manipulate.getAnalogousColors(sampleColor);
console.log('Analogous Colors:', analogousColors);`
  • Get Monochromatic Colors
  const monochromaticColors = ColorRepoKim .manipulate.getMonochromaticColors(sampleColor, 5);
  console.log('Monochromatic Colors:', monochromaticColors);`
  • Additional Color Manipulation Methods
    ColorRepoKim provides more advanced color manipulation methods:

    • Triadic Colors
    • Tetradic Colors
    • Lighten Color
    • Darken Color
    • Invert Color

    Explore these methods in the API Documentation.

API Documentation

For detailed information on all available methods and their parameters, refer to the API Documentation.

Examples

React Component

  export const Component = (props) => {
    const { baseColor } = props;
    const [currentColor, setCurrentColor] = useState(baseColor);
  
    return (
        <article className={`...other bg-${currentColor}-500`}>
          <button>click me</button>
        </article>
  )

Contributing

If you have ideas for new features, improvements, or find any issues, feel free to contribute by opening an issue or a pull request.

License

This library is licensed under the MIT License - see the file for details. LICENSEThis expanded README includes sections for API Documentation, Examples, and a basic React Component.

color-repo-doc's People

Contributors

carloskim123 avatar

Stargazers

 avatar

Watchers

 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.