Dye Mixer v1.1 (java)



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.


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.


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


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.


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.


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

37 thoughts on “Dye Mixer v1.1 (java)”

  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.

  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!

  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”?

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

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

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

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

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

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

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

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

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


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

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


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

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

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

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

  17. 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″;

  18. I cannot open the applet. I uninstalled and reinstalled latest version of JAVA. I’ve tried the alternative link you provided. Neither worked. Please advise.

  19. Hi Olli,

    I really appreciate your applet! Looking for a lightfast dye/pigment with peak absorption spectrum between about 570-590 nm. Unable to download your spectra text file (link broken…) Would you be able to help with providing names of dyes and their absorption spectra? Specifically the ones with narrow-band absorption.

    Saw blue MX-7RX, but Mrs. Paula Burch mentioned on her website that it is not lightfast. My medium is polyurethane and other transparent plastics. Do you think this dye or others can work with plastics?

    Thank you!

  20. Kevin, I fixed the .jar link. I would not use MX-7RX outdoors, it is such poor lightfastness. Procion MX dyes are water soluble, so might have poor solubility in hydrophobic plastics. Look for dyes intended for plastics.

  21. Is it possible to update this software for mac users in 2020?
    Neither Chrome or Safari support it anymore

  22. Hi, I came across this page while searching for some indication as to how I might mix Procion dyes to achieve a color I’m after. Unfortunately, I can’t seem to actually get the applet to work on either Windows or Mac. Would you be willing to release source code, or throw this on github, or in some other way offer folks the ability to make use of it on modern systems?

    1. It looks like the source code has been released in a previous comment about. Please could you post if you get it to work?

  23. Hi all.

    A tie-dying friend of mine has asked me to look at this tool and update it so that it can run on modern systems. I am working on this now and hope to have a stand-alone version available within a few weeks.

    I have no affiliation with the original author but thank him for releasing this tool to the public domain so that anyone can take and modify it. That will let me keep it alive for many other users and (hopefully) years to come.

  24. Hey everyone –

    A friend and I are working on an updated version of this app, thanks to Oli’s kind release of the source code. If we can get it working again, I’ll post info here on how you can get it.

Leave a Reply to Joan Cancel reply

Your email address will not be published.