How to import 4000+ colors


#1

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.


Create Materials / Paint Colours Palette from List of Names and RGB Values?
#2

Check this out.


#3

I get this @DaveR


#4

Really? Try again. The link is correct.


#5

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


#6

Huh, strange. its working now.

Thanks!


#7

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!


#8

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!


#9

Mass material importer may still work.


#10

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


#11

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.


#12

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!


Color values to skm code
#13

I posted it in the dev forum… click here


#14

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


#15

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


#16

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


#17

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.