Git Product home page Git Product logo

color-delta-e's People

Contributors

aldipermanaetikaputra avatar seppwc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

color-delta-e's Issues

Feature Request: Sort

another handy function to include would be a sorting function that sorts colors by the deltaE compared to a base color

example api

const sorted = sort('#dd2244', ['#e83b3b', '#db2424', '#df1111', '#b50303'])

sorted // ['#b50303', '#df1111', '#db2424', '#e83b3b']

Feature Request: Filter

A good feature to add to the repo would be a filter function that takes a base color and a list of colors (like selector) and returns a new list of colors containing only the percievable colors inside.

example api

const filtered = filter('#dd2244', ['#dd2244' ,'#e83b3b', '#45b0b0'], { 
// options
})

filters // ['#dd2244', '#45b0b0']

this could probably be implemented easily with the current functions we have already

 const filtered  = ['#dd2244' ,'#e83b3b', '#45b0b0'].filter((color)=>{
       return isPerceiveable('#dd2244', color)
 })

Feature Request: Pipe

along with filter and sort, it might be useful to create a pipe function that takes a base color and then and array of various operation functions, to make filtering, sorted etc more functional

example api

// arg1: baseColor to compare, args...: operation functions
const getOrderedPerceiveableColors = pipe('#dd2244', filter, sort)

const colors = getOrderedPerceiveableColors(['#b50303', '#c73d3d', '#d97878'])

colors // ['#d97878', '#b50303']

docs: filter & sort

these two have been added to main but no docs are written for them, these should ideally be added before next minor update

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.