iki.fi/o

Dye Mixer v1.1 (java)

Created by Olli Niemitalo on 2006-08-10, last modified 2013-06-03

2006/08/10

[APPLET HERE]

Problems running Java applets? If you have Windows 7, go to Control Panel, search for Java, go to Java Control Panel tab Java, change Java Runtime Environments settings by adding

to the runtime parameters. Or try this alternative page of Dye Mixer.

Introduction

Hello, fellow dyer!

If the Dye Mixer won't start within a couple of minutes, your browser probably doesn't support Java and you need Java plug-in 1.1 (or later) for your WWW browser. You may need to restart the browser after installation.

screenshot

Screenshot

The basic idea of the Dye Mixer is to let you to try out various dye combinations on various canvases under various lighting conditions, in "virtual reality", with only virtual fabric and dye wasted. :-)

Instructions

Here are descriptions of the different parts of the Dye Mixer user interface:

  • You can alter the virtual lighting conditions by choosing the appropriate Illuminant. Objects appear a different color under different illuminants, so make a choice similar to what you have where your work will be viewed in.
  • Illuminant Swatch shows the appearance of the illuminantion on a truly white surface. Each Swatch shows its CIE xy color coordinates.
  • Checking Illuminant White adapt makes the illumination appear the same color as the white on your computer screen, to which your vision has adapted to. This will make subjective color evaluation easier. However, if you want to compare absolute colors by holding an object against the computer screen, you should uncheck Illuminant White adapt.
  • Before proceeding to dyes, you must choose the Canvas. Dyes appear different color on different canvases.
  • Canvas Swatch shows the appearance of the canvas in the chosen illumination.
  • Checking Canvas White adapt makes the canvas appear the same color as the white on your computer screen. This may be useful if you have a large canvas, to which your vision adapts, and a small dyed area, and you want to see how the dyed area appears in the context of its surroundings. To view absolute colors, uncheck Canvas White adapt.
  • Checking Canvas Brightness adapt increases the amount of light the canvas is exposed to, but does not interfere with the absolute tone of color. Canvas Brightness adapt has no effect if Canvas White adapt is enabled.
  • The Dye Mixer allows mixing 8 dyes simultaneously. For each dye:
    • Choose the Dye you want to use. Note that the Dye Mixer is ignorant of the chemical compatibility of different dyes and canvases.
    • Checking Mix will include the dye in the combined mixture of dyes.
    • Amount of dye can be changed either by operating the slider, or numerically. The actual amount or concentration of dye required for the same effect in the laboratory can be direcly proportional to the Amount value. (I'd love to hear your experiments on this!) The proportionality coefficient you must use is different for different dyes and canvases.
    • Swatch shows the dyed canvas.
  • Mixed swatch shows the canvas dyed with all the selected dyes.
  • Checking Mixed swatch Brightness adapt increases the amount of light the dyed canvas is exposed to, but does not interfere with the absolute tone of color.

Here are some typical uses for the Dye Mixer:

  • You have a color in the back of your mind and wish to find a dye combination to realize it. Set your computer screen white balance so that it matches the white balance in the space you are in, or just let your eyes adjust to the monitor white balance. Enable Illuminant White adapt. Choose the Canvas and Illuminant as close as possible to what your work will be showed using. Try different dye amounts and combinations until you get an acceptable result. Just to be sure, write down what you are using. Try to use dyes sparingly! In actual reality, for each of the dyes you use in the mix, dye a swatch and see if it gets the same tone of color as the Dye Swatch in the Dye Mixer. Adjust the amount of dye until you have a matching result (see below for matching instructions).
  • You want to compare the color of a real-life object to a color produced by the Dye Mixer. Adjust the white balance of your computer screen to 6500 K. Choose an illuminant as close as possible to what you have in the space you are in. Disable white adaptations in the Dye Mixer. Adjust the computer screen contrast and the amout of lighting in your room so that the Dye Mixer's swatch has the same brightness as the object. Compare the colors between the Dye Mixer's swatch and the object.

Happy mixing!

Version history

This is version 1.1 of the Dye Mixer. Some of the older versions are available. The evolution of the Dye Mixer has been as follows (read from bottom to top):

1.1 Plenty of illuminant, canvas and dye data has been added. Most of the data is now in a separate text file, allowing adding new data without recompilation, or updating the Dye Mixer version. The biggest improvement, however, is that now the Dye Mixer is Java 1.1 compatible! This is good because Sun's license for Java 1.2 (used in the Dye Mixer 1.0) and greater is, for some users and browser vendors, unacceptably restrictive. There has been some changes in the scalings of dye amounts - sorry about that if you wrote down some formulas. You can convert the 1.0 amounts to 1.1 notation by a simple calculation.
1.0 Added sliders and some minor things; improved much on ease of use.
0.9 Initial version.

Technical details

The jar package of the applet is made available for download.

The operation of Dye Mixer is spectrum-based. So, adding a new light source, canvas or dye will require measuring the spectrum. I will be happy to add a new dye (or light, or canvas) if you can provide me with its spectrum and as much information of the dye as possible. If you are unable to locate a spectrophotometer, you could also send me a sample of the dye.

The Procion MX dye absorbance spectra were measured with a spectrophotometer from 350 nm to 800 nm at 5 nm steps, using concentrations that kept absorbance under 1.0, with distilled water as solvent. The canvas reflectance spectra were measured with my own mirror apparatus combined with a spectrophotometer, using a tissue paper as white reference. The theoretical light spectra are computed by Dye Mixer and the rest of the spectra were obtained from various sources.

A simple absorbance model is used with the dyes: The absorbance spectrum of a dye is multiplied by the amount value. This is analogous to increasing the thickness, or concentration, of the dye layer. The model is unable to handle fluorescent materials and dyes.

The CIE XYZ tristimulus coordinates are calculated from the obtained light spectrum and further converted into sRGB for viewing. Java XYZ to sRGB conversion uses CIE D50 instead of CIE D65, so I coded my own according to the sRGB standard. sRGB uses the CIE D65 reference illuminant white point, so you should adjust your monitor and your room lighting to 6500 K color temperature, if you want to view absolute colors and compare samples directly against the picture on the monitor. Normally you should, however, resort to subjective comparison, using the screen white as the white reference for the virtual sample, and the room lighting (as reflected from white walls, paper) as the white referene for the actual sample.

References

The input spectra came from various sources:

  • CIE, standards spectra.
  • Wenham, S.R., Green, M.A. and Watt, M.E., standards spectra.
  • Mitsubishi Electric, illuminant spectra.
  • Kobus Barnard, Lindsay Martin, Brian Funt and Adam Coath, illuminant spectra.
  • Jouni Haanpalo, dye absorbance spectra.
  • Eastman Kodak, reflectance spectra.
  • Purdue University, reflectance spectra.
  • Noboru Ohta, reflectance spectra.

Links

Here are some related links:

A bit of background

I got interested in textile dyes after I bought a tie-dye T-shirt at Berkeley, California, which I visited during a "business trip" in spring 2001. I loved the place for it atmosphere, too. I grew fond of colorful hippie clothes, and wanted more. I could not find any locally (in Finland, they hardly even sell T-shirts during winter). The consequence was that I ordered, together with my mother Hanna (I didn't have a credit card) some Procion MX dyes from Quilt und Art, Germany, to dye my own clothes.

Since, I have dyed tens of T-shirts and some other items. Most have been bought by my friends, for small fees certainly not to be of any interest to tax officials... :-)

25 Comments »

  1. Hello,

    I found your applet through Paula Burch's wonderful site. Thank you for creating this nice application. My question, why does increasing the concentration of a single dye shift the spectrum - just the dye molecules interacting with themselves due to the concentration, modifying the absorption spectrum? (I'd call it quenching if this was fluorescence; in absorption I've forgotten what it is.)

    PS - I'm trying to get an idea of creating a nice "scarlet" with Procion Red MX-5B and Orange MX-2R.

    Thanks again.

    Comment by Rebecca — 2009-10-28 @ 05:21

  2. Rebecca,

    No interaction between dye molecules is required to explain the shift. If you increase the concentration of a dye, then it will start to absorb significant amounts of light even at those wavelengths for which the absorption spectrum is for weaker concentrations close to zero (almost no absorbance). As the absorption spectra are typically smooth functions of wavelength, the result of increasing the dye concentration is that the "cutoff" wavelength (where one starts to have significant absorbance) is effectively shifted. If you try comparing Procion Yellow MX-8G and Yellow MX-3R, you see that there is a shift towards red when increasing Yellow MX-3R and not much shift with Yellow MX-8G. This is because the spectrum of Yellow MX-3R is smoother (there is some absorbance for a longer range of wavelengths). The transition from no absorbance to significant absorbance is very short with Yellow MX-8G, so there can't be much shift with that dye.

    In my experience, Procion MX dyes are not very good for bright reds like scarlet. It will look a bit dull or a bit orange, unless, perhaps, if you use huge amounts of Red MX-5B or Red MX-8B in the recipe, which is not convenient.

    Your thanks are much appreciated! Happy dyeing!

    Comment by Olli Niemitalo — 2009-10-28 @ 12:01

  3. Hi there - I'm trying to use your applet to find a mix of dyes that will produce a gold color, but I'm confused about what I should put in the amount box. If I typically use 2 tsp of dye powder per 8 oz of solution, should I use 2? Or do I have to compare a swatch of fabric dyed with that solution to the computer screen to figure out how to represent the "amount"?

    Comment by Susan-Marie — 2009-12-03 @ 21:30

  4. Hi! Try the swatch thing. When you do the comparison, put the fabric swatch say on a piece of white paper, and then compare how it looks against the applet. You will then find a certain amount box value that gives the best match. Let's call this value "reference amount". Then, when you have your gold color mix ready, divide the current amount box value with reference amount. Let's call the resulting number the "scaling factor". Multiply the actual amount of dye you used in the swatch dyeing recipe by the scaling factor to get the actual amount of dye to use for the gold color.

    Comment by Olli Niemitalo — 2009-12-03 @ 21:49

  5. Hi,
    That tie dye shirt you bought in Berkeley was probably done with dyes from my shop in Berkeley.
    Anyway, I'd like to add your dye mixer applet to my website and maybe as a Facebook posting. With credit to you, the creator, of course.
    I think our dye customers would find it of interest.
    Let me know if that would be OK with you.
    Cheers,
    Isaac

    Comment by Isaac — 2010-04-01 @ 04:33

  6. Isaac, what a delightful coincidence. :) The T-shirt seller was a lady who had her baby with her, in a kind of metal cage. Yes, you have my permission!

    Comment by Olli Niemitalo — 2010-04-01 @ 09:21

  7. [...] wonderful fellow in Finland did us all a huge favor by creating a simulation applet for mixing a variety of commonly used dyes on different canvases with different types of illumination. Trial and error is still needed to get [...]

    Pingback by Dye Mixer Applet « The Clothing Co-op — Save a buck. Save the earth. Strut your standout style. — 2010-12-08 @ 11:06

  8. Hello!

    This looks like a very neat tool! I own a small tie-dye business in Nova Scotia and I would love to use the Dye Mixer app., but it's not working for me! I have the latest java update, any suggestions?

    Thanks so much!

    Comment by Mr. B — 2011-02-16 @ 16:46

  9. Mr. B,

    Do other Java applets work for you?

    Comment by Olli Niemitalo — 2011-02-24 @ 23:12

  10. Hi does anybody know if I can match to pantone textile swatches

    Comment by trisha — 2011-03-05 @ 09:13

  11. [...] http://yehar.com/blog/?p=307/dyemixer/ Share this:TwitterFacebookLike this:LikeBe the first to like this post. Published: September 27, 2011 Filed Under: Uncategorized [...]

    Pingback by web application for dyers « KCAI_FIBER — 2011-09-27 @ 19:00

  12. I found your applet trough Paula Burch's site and I really would like to THANK YOU for it! Wonderful object!

    Comment by Silvia — 2012-04-13 @ 10:07

  13. [...] Through her blog I also found a neat dye mixing tool. [...]

    Pingback by Further thoughts on dyeing | Katya Czaja — 2012-04-23 @ 16:08

  14. what a great idea...but it's not working on my computer..failed to load
    but thank you anyway
    and a hello from the South up to the North
    Barbara

    Comment by Barbara — 2012-05-09 @ 16:43

  15. Hi there! I am fairly inexperienced with dying. . . other that I have used RIT to refresh faded black pants when I used to work in restaurants. I found an amazing shirt -- unfortunately, it only came in a very bright purple color, which to be honest clashes with the reddish-auburn color of my hair and looks awful. It is a 95% rayon 5% spandex blend. After a lot of research online, it's obvious I need to go with a cool water product. Thanks for this wonderful tool! It's helped give me some options other than just dying the shirt black. Just wondering, since this will be my first shot (and only, since I didn't buy multiples of the shirt) at over-dying anything, if any of you more experienced dyers have any advice? I am planning to use Procion MX in a combination of turquoise and yellow to achieve a dark teal over the purple. Any advice would be greatly appreciated!

    Comment by Misha — 2012-07-21 @ 19:10

  16. Ollie, I found your site through Yahoo Answers. Thank you so much for the time and effort you have put into this, and for sharing it. It is a wonderful tool.

    Comment by Joan — 2012-09-01 @ 23:35

  17. Hi Ollie,

    This is great! Thanks for all the work you have done to put it together!

    I was wondering how I can find the spectra of the dyes? I have been using A22 Sahara Sun, which is no longer produced, so I have to find a replacement. I have a spectrum I created from my sample of A22 Sahara Sun, but was thinking if there is another way to find a match rather than by buying samples and comparing them. Paula Burch suggested Procion Yellow MX-8G, so I am mainly interested in finding the spectrum of that one at first.

    Ann

    Comment by Ann Fenech — 2012-09-13 @ 15:51

  18. My pleasure, Ann! If you open http://yehar.com/blog/wp-content/uploads/2009/09/DyeMixer.jar as a zip archive, you will find inside a file "data.txt" which has all the included spectra in plaintext. If you send me the A22 Sahara Sun spectrum to o@iki.fi, I'll be happy to add it to the applet.

    Comment by Olli Niemitalo — 2012-09-13 @ 22:41

  19. This is an AWESOME app. I was trying to figure out how to mix dye to get what I wanted for a sewing project. I am recycling an old coat to a new coat. Found your application through googling stuff. Very successful on the first try. I messed around and got the approximate color that I wanted, then went and dyed and was very happy with the results. I am using it again to match some other colors for the project. Thanks so much! I have passed your link onto friends. I will post the link in my blog.

    Thanks again.

    Comment by Susan — 2012-09-29 @ 18:22

  20. Olli,

    I am new to MX dye, and I understand that each fiber exhibits the color in a different way. I've seen recipes where, for instances, for a particular blue it would be 1 part turquoise to 2 parts basic blue for cotton, but to get the same color on silk would require a different ratio. I don't know much about optics - how could the applet calculations accommodate the impact of the fiber?

    Thanks

    Comment by Rob Bartlett — 2013-03-27 @ 04:09

  21. Rob, currently there is no "which fiber?" setting in the applet. For that I would need to measure the reflectance spectra from fabric samples. I do not know what the optical difference between silk and cotton is, but it may be that much of the effect is simply from different reactivities, because Procion MX dyes bind to cellulose and protein fibers by a different mechanism. This may result in different ratios of bound and wasted dye. To accommodate for this, simply different scaling factors must be used for the amount values to get to real quantities. The amount values are probably not very reliable, in any case, so a bit of experimentation may be needed to get an appropriate mix of dyes for a particular color.

    There may be other contributing factors. The microenvironment around the bound dye molecules may affect their absorbance spectra. Also any clustering of bound dye molecules may have an effect as they "shadow" each others. And also the optical properties of the fibers are different; the statistical distributions of the photon paths in the fabric differ. Also if the dye molecules bind to the different fibers from different functional groups of atoms, this may result in a slightly different absorption spectrum for the dye molecules.

    I have made some work towards a more complex color model that could replicate some of these effects, but it will not be finished very soon.

    Comment by Olli Niemitalo — 2013-03-29 @ 10:32

  22. I would love to use this, but it won't work on my iPad 2. Is there any way, because its the only computer I use.

    Comment by Myah — 2013-07-21 @ 11:00

  23. Myah: maybe some day I'll make a HTML5 version. But until then I don't know how.

    Comment by Olli Niemitalo — 2013-07-25 @ 19:42

  24. Hi

    I am trying to get C.I. numbers for the Red Yellow and Blue (including navy and Turquoise ) Procion dyes you have mentioned on your Dye Mixer. Can you help ?

    Comment by ravi — 2014-06-14 @ 07:00

  25. Ravi:

    name="Procion MX, turquoise MX-G";
    ci="reactive blue 140";

    name="Procion MX, blue MX-G";
    ci="reactive blue 163";

    name="Procion MX, blue MX-7RX";
    ci="reactive blue 161";

    name="Procion MX, yellow MX-8G";
    ci="reactive yellow 86";

    name="Procion MX, yellow MX-3R";
    ci="reactive orange 86";

    name="Procion MX, orange MX-2R";
    ci="reactive orange 2";

    name="Procion MX, red MX-8B";
    ci="reactive red 11";

    name="Procion MX, red MX-5B";
    ci="reactive red 2";

    name="Procion MX, blue MX-2G";
    ci="reactive blue 109";

    Comment by Olli Niemitalo — 2014-07-02 @ 11:56

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress – Hosted by Iggo