dsalychev / rgb2pal Goto Github PK
View Code? Open in Web Editor NEWFind a nearest color to the RGB one from a palette
License: BSD 3-Clause "New" or "Revised" License
Find a nearest color to the RGB one from a palette
License: BSD 3-Clause "New" or "Revised" License
RGB to palette -------------- It's a program to find a nearest color from the given palette to the selected 24-bit RGB. It calculates a distance between two colors in YUV colorspace in order to find similar ones according to the "average human perception". How to install -------------- Running: $ mkdir build && cd build $ cmake .. && make install from the repository root should generally be enough to install the program. Please, note that terminal palette won't be installed by default. How to use ---------- In order to find the nearest color to #BC7575 from a palette with 256 terminal colors, run: $ rgb2pal bc7575 terminal256.palette 131 #af5f5f You'll receive a color with index 131 which value is #AF5F5F.
1). Would be great if the output contained the provided color as well, something like this:
$ rgb2pal 880000 terminal256.palette
#880000: 88 #870000
Such reference could be very helpful in case of feeding a whole pack of colors from an external file, like this:
while read p; do rgbpal $p; done < col.txt
2). Also, for some additional visualisation it might be helpful to actually colorize the output according to the resulting colors?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.