How To Make A Custom Color Swatch in SolidWorks

by Josh on March 18, 2008 · Comments

color-swatches.jpgWhoa there buddy, I think you’re getting carried away with all of those colors. That much is certainly not per procedures and we’re gonna have to beat you black and white.

It happens, I know. You want an accurate for your model and you can’t help but spend hours dragging your cursor through the Properties to get just the right shade of used-wet-gasket-red or brushed-aluminum- anodized-gray. It’s affecting the way you work and driving you insane. There’s a better way.

swx-color-properties.jpgCreate a New Swatch
When you edit the of a document you have a set of properties that show up in the PropertyMananger. In the favorites section there’s a pulldown that has several preset swatches. You can use those or click the button to the left to create a new one. By default it saves a swatch.sldclr to your My Documents directory, but you can name it and save it where ever you want.

Add the Colors
Now, if you’re trying to get a particular it’s hard to drag the cursor around the properties section and get exactly what you’re looking for. What you can do is edit the swatch.sldclr file you created by simply adding hex code. Here’s the steps.

  1. Open swatch.sldclr in a text editor (Wordpad)
  2. Copy the following code after the line that has opening tag </ColorSwatch>
    < RGB=”ffc0c0″>
    <Optical />
    </>
  3. Change the 6-digit number for RGB to whatever hex code you want (see below for ways of finding these.)
  4. Do the above two steps for all the colors you desire.
  5. Make sure there is a </ColorSwatch> on the last line.

For example
I want a palette of some colors my favorite tattoo graphic artist, Dave Quiggle uses. I used PhotoShop to grab the and copy the Hex code. Here’s the example file.

Download Josh’s SolidWorks Tattoo Color Swatch

It’s a roundabout way of adding the colors, but it’s a lot quicker than putting the value in the Properties. Hopefully will add a picker or a Hex code entry field. Odd that it’s coded that way in the file but split up in the properties.

If you’re looking for ideas on palettes check out ColourLovers or Adobe Kuler. You can also use the online ColorSchemer to get hex codes.

(No Ratings Yet)
Loading ... Loading ...
  • marijn
    hey I love this blog and are keeping a steady eye on it.
    So i tried this one out.
    I came across the problem that the filetype the sldclr is, is very important.
    Because it did not work in textpad or notepad. Only wordpad seemed to do the job(saved as unicode). So here is my version:
    The colors:
    http://img237.imageshack.us/img237/2193/6790134...
  • Personally in my line of work we use RAL colours for the majority of our products. I use this web site http://www.easyrgb.com/ (look at the search tints), pick the colour codes you use e.g RAL put in the RAL number it then gives you the RGB value, then put this into the colour fields. I've found this quicker than trying to approxiamte what I'm try to achieve.
  • marijn
    Okey we use the RAL colors to so i converted a site into the solidworks swatches.
    I converted this site: http://www.stephen.hull.btinternet.co.uk/ral.html
    splitted them into 4 parts and here is the results took me like 1 hour to make. And because i like to share here is the download: http://marijn.sharper.nl/public/RAL%20colors/Ra...
    Installation instructions just copy them on your desktop and open rmouse open with > solidworks.
  • Marijn, do you still have those RAL swatches. The links posted in your comment don't work any longer. Thanks!
  • Josh
    Hey! very cool, good call on the RAL palette. Makes me want to go through the pantone colors and create those which would have probably been more helpful than some random colors from some tattoo art :)
  • marijn
    I just hit me you can change the colour swatch file loctions in options>file locations!
  • Peter
    Hi.

    Real nice with the RAL colours.
    Does anyone know if it's possible to choose colour to apply by number ie 1015. As it is know you will have to guess what colour that represents 1015. Could be nice to know.
  • Josh
    Hi Peter. I've tried to add a color 'name' to the ColorSwatch Schema (C:\Program Files\SolidWorks 2008\SolidWorks\data\xmlschema) but have not been successful thus far. If you know a little bit more than me about XML you could probably figure it out.
blog comments powered by Disqus