-
Notifications
You must be signed in to change notification settings - Fork 30
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
Limit function #19
Comments
Hi! could you give me a link to the python code? |
Sorry, i cant seem to find the source nor do i remember where i got this snipprt. Im sorry. Ill try to do some more search. Below is a ExtendScript version i use to compare CMYK color to a PMS color list in CMYK. This one also has some sort of limit or precision. The precs value is some sort of precision input. I believe it is used to check 2 color values against each other and see if they are below this value. The higher the value, the more results it can return. Hope i explain it well enough
|
Okay, i think i found the source again for that RGB function in python; https://github.com/Korchy/b3d_lib_int/blob/master/rgb.py |
So basically what you want is a way to match a color to a list of the most relevant colors (up-to-a-limit)? I.e. Given colors c1, c2, c3, c4. If you set limit to 1 and check relevance for c1 to c2,c3,c4 you get an array with the color with the least diff. If you specify 2 you will get a list with the most relevant color (least diff) first and second the color with the least diff among the remaning colors? |
Yeah something like that. I yave a version already from someone else. But id like to see if there are different methods to tacklle this. The base part is from one of wundes scripts to match pms colors. Ive used this to make a custom cmyk or rgb to oms converted which can be done by script. The rrason is that recolor in illustrator cant be reach by script. Also adobe and pms have parted ways. But i still want to ve able to use it in scripting. Ive been working on a panel which generates and export logo and its logo types together with different color versions. Its called logo packer, you can see it here l: https://github.com/schroef/logo-packer |
I bumped into this lib by search for checking color relevance. I got a python example which can order them by relevance using a limit as well. So instead of returning 1 color, it returns an ordered list with a preset limit..
Is such a thing possible?
This example transform the RGB values to a vector list and then uses .length. I dont fully understand/know what .lenght is though in vector lists. I was think 3d points, but since these are its different i guess?!
The text was updated successfully, but these errors were encountered: