Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Filter #2

Closed
seppwc opened this issue Sep 9, 2022 · 0 comments · Fixed by #5
Closed

Feature Request: Filter #2

seppwc opened this issue Sep 9, 2022 · 0 comments · Fixed by #5
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@seppwc
Copy link
Owner

seppwc commented Sep 9, 2022

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)
 })
@seppwc seppwc added enhancement New feature or request good first issue Good for newcomers labels Sep 9, 2022
@seppwc seppwc linked a pull request Sep 14, 2022 that will close this issue
@seppwc seppwc closed this as completed in #5 Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant