How To Make A Custom Color Swatch in SolidWorks

Hello! if you're new here, you may want to subscribe to the SolidSmack RSS feed or to the free email updates. Thanks for visiting!

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

It happens, I know. You want an accurate color for your model and you can’t help but spend hours dragging your cursor through the Color 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 color 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 color it’s hard to drag the cursor around the color 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 color 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>
    <Color RGB=”ffc0c0″>
    <Optical />
    </Color>
  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 color palette of some colors my favorite tattoo graphic artist, Dave Quiggle uses. I used PhotoShop to grab the color 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 Color Properties. Hopefully SolidWorks will add a color 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 color palettes check out ColourLovers or Adobe Kuler. You can also use the online ColorSchemer to get hex color codes.

If you haven't already, consider subscribing to SolidSmack so you can easily receive updates when new articles are published or announcements are made.

7 Responses to “How To Make A Custom Color Swatch in SolidWorks”



  1. 1 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/67901340ko3.png

  2. 2 Ken Carpenter

    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.

  3. 3 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/Ral%20colors.zip
    Installation instructions just copy them on your desktop and open rmouse open with > solidworks.

  4. 4 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 :)

  5. 5 marijn

    I just hit me you can change the colour swatch file loctions in options>file locations!

  6. 6 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.

  7. 7 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.

Leave a Reply