Evaluation of metachromasia is based on the color of a pixel or an area. In a typical microscpic image of a sample stained with a metachromatic dye, the observed colors range between gray and purple, and the more purple a pixel is, the more metachromasia it displays. Therefore, quantitative analysis of metachromasia is based on determining how close the color of a certain pixel is to the most purple color. This imaginary distance will have to be normalized, and the RGB cube presents a useful tool for achieving this aim.
In the RGB color model, each color is represented by a number triplet characterizing the intensity of Red, Green and Blue colors. The range of these numbers is 0-255.
Since pure red, green and blue contain only red, green or blue intensities, they are represented by [255, 0, 0], [0, 255, 0] and [0, 0, 255], respectively. Black is the complete absence of any of these base colors, while white contains full intensities of each of them. An arbitrary color can be generated by additively mixing the base colors, e.g., yellow is the additive mixture of red and green. For metachromasia, the two most important colors are gray and purple. Gray is an equal mixture of red, green and blue, and its shade is determined by how much of each color is added. Purple, on the other hand, is a mixture of red and blue.
Since the three colors can be thought of as the three spatial dimensons, their intensities can be plotted on the X, Y and Z axes. Consequently, each color can be represented in the RGB cube shown on the left.
For the calculation of metachromasia indices, the user has to pick two colors in the metachromatic images (see the figure on the left):
The first index is defined according to the following equation:
Since the main diagonal of the cube is
and the distance between the color of a pixel of interest and the most purple pixel in the RGB cube is d , index1 characterizes how close the color of a certain pixel is to the most metachromatic color relative to the largest possible distance in the RGB cube.
The second index is defined according to the following equation:
where dmax is the distance between the gray background and the most metachromatic color in the RGB cube. Therefore, this index expresses how close the color of a certain pixel is to the most purple color normalized to the distance between the most gray and the most purple pixels in the RGB cube.
The third index is calculated according to the following equation:
This parameter characterizes the distance between the color of the most purple area and the projection of the color of the pixel of interest on the line connecting the most gray and the most purple colors (d1). In other words, the thick blue line in the figure on the left represents a continuous transition between the most gray and the most purple colors in a certain experiment in the RGB space. The third index characterizes how much the color of a certain pixel resembles the color of the most purple area in the continuum of colors between the most gray and the most purple.
There are two options for running the program:
Use of the program is demonstrated in figure A above: