Developed to coordinate renderings with presentations put together using Adobe products, the following function allows for the conversion of Adobe ASE swatch library files to Grasshopper RGB and CMYK values which can be plugged into the appropriate grasshopper color functions. Simply specify the filepath to an ASE file containing CMYK, RGB, or HEX values using the “File(Read File)” component, from which the function will return a lists of the corresponding C, M, Y and K values and R, G, and B values as defined in the ASE file. Hex colors are converted to RGB internally, RGB values are set between 0-255, and CMYK are scaled from 0-100 to 0-1.0 as specified by the grasshopper component. So far it has been tested with both custom color pallets created from illustrator and pallets downloaded from Kuler.
This function was developed as a quick fix, so this is most likely not the most optimal solution. But it seems to work.
INPUT String List ASEtxt Input for ASE text file
OUTPUT Double List C Cyan CMYK Value
OUTPUT Double List M Magenta CMYK Value
OUTPUT Double List Y Yellow CMYK Value
OUTPUT Double List K Key CMYK Value
OUTPUT Double List R Red RGB Value
OUTPUT Double List G Green RGB Value
OUTPUT Double List B Blue RGB Value
gha | Download User Objects
gh | Download Grasshopper Sample Files
Platform | Rhino 5, Grasshopper
Version | Grasshopper 0.9.0075
Type | Visual Basic Component