distinct-colors | Generate a palette of visually distinct colors | Data Visualization library
kandi X-RAY | distinct-colors Summary
kandi X-RAY | distinct-colors Summary
This is a complete rewrite of (but is heavily inspired by) Mathieu Jacomy's Palette Generator. I have taken the ideas and the theories, and put them into a simple modular library. I have also optimized it for speed. This library generates a palette of visually distinct colors, and returns an array of chroma-js objects.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of distinct-colors
distinct-colors Key Features
distinct-colors Examples and Code Snippets
Community Discussions
Trending Discussions on distinct-colors
QUESTION
I found code to generate n distinct colors. I took the code and made a class out of it
...ANSWER
Answered 2017-Oct-26 at 20:37I read some documentation (as was suggested in the comments) and this is what I came up with (just in case someone will find that useful)
QUESTION
Here is a website that contains 20 colors that are the most simple and distinct: http://sashat.me/2017/01/11/list-of-20-simple-distinct-colors/
I am making a program that detects colors and gives them a name.
The problem is that I need a function that would:
Take in 3 parameters, R, G, and B.
Determine which of the 20 is this color the closest when the function is given the RGB.
Here are some examples of the ideal function:
...ANSWER
Answered 2017-Jun-09 at 16:47I've answered my own question in order to help future viewers.
Using the color difference formula found on the wikipedia and shown in the comments, this function will take in 3 parameters and return the closest color.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install distinct-colors
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page