How to import 4000+ colors

Hi all,

I need to get over 4,000 colors into a project so I can save the materials as a custom library. I’ve googled my brains out trying to find a script, extension, plugin or pretty much anything else to figure out how to do this without individually entering 4000+ color values. Any help would be greatly appreciated.

Check this out.

I get this @DaveR

Really? Try again. The link is correct.

are they just colors or are they images with texture?

what format do you have for them?

is it a ‘standard’ library that may already exist? i.e. Ral, Pantone, etc…
did you ask this yesterday from a different account? [if so those answers seem to have disappeared]

john

Huh, strange. its working now.

Thanks!

Thanks Dave. That was actually me posting in Sketchucation. I didn’t word the title very well so I edited it. Thanks for trying though!

Hi John,

They’re paint colors, no textures.

I have HEX, RGB, and Lab color values along with the actual names of the colors in a .csv file.

Unfortunately, it’s not an existing library.

I did ask yesterday in Sketchucation, however I didn’t word the title of the topic very well and it looked like I was giving a tip as opposed to asking for one. Apologies for the confusion!

Mass material importer may still work.

ok…

basically a skm [Sketchup material extension] file is a zip file…

Pan_100 C.skm
     doc_thumbnail.png
     document.xml 
     documentProperties.xml 
     references.xml 

you can write all these files given a list of color values…

I used php for the one I wrote because it has a very simple way to make the color png file, and is very good for xml…

as I use a mac, the code to automatically zip, rename and move would probably need changing for a PC…

mine also uses a scrapper for html table values, which won’t work without modifying on csv files…

@jim_foltz or @TIG may have a windows version for ‘color’ conversion to skm…

Mass Material Importer needs image files pre made for it to work…

I can PM you my code if you want to give it a go…

john

2 Likes

I did try Mass Material Importer with the .ase files I created but it didn’t work. The .ase files that are referred to in that particular plugin are for a 3D modeling program whereas the .ase files I created are Adobe swatch exchange files.

Ah ok, that makes sense. I knew there had to be something behind the .skm files that made them tick. If I could give your code a try, that would be fantastic!

I posted it in the dev forum… click here

Got it! Wow, the code even creates the thumbnail? Did I read that right?

that’s the whole idea and why I used php instead of ruby…

Brilliant! I can’t thank you enough. This is a lifesaver.

Floating around out there somewhere is a Skm file for ral colors. The funny thing is if you open the file in a text editor it is just a delimited text file. But when you put the file in sketchup’s materials folder sketch up converted it to a materials library. I’m not sure if this still works.