2 Replies Latest reply: Apr 23, 2010 3:26 AM by Hisanori Ogasawara RSS

    Need Help: How to use ColorMix2 function?

    Hisanori Ogasawara

      Dear all,

      I've been trying to put gradient colors on bar chart thourhg the Color Wizard: Not by using the color setting on the color tab.

      According to help, it seems to be possible to do it with ColorMix2() function: it says "colormix2(x, red(), green()) returns colors in a gradient from red to green, via brown." * x is a real number between -1 and 1.

      However, i never succeeded. If I put "colormix2(0, red(), green())," it always returns brown with no gradient.

      Has anyone succeeded in using this function? Or is this a bug?

      Thanks for your kind help,


        • Need Help: How to use ColorMix2 function?
          Or Shoham

          ColorMix2()'s first argument - the one you hard-coded as 0 - decides the level of gradient. As long as you use 0 there, you will always get brown. You need to replace the 0 with the actual values you want to color-code by. For example, if you have a percentage value between 0 and 100%, and 100% is good, you might use:

          ColorMix2((myValue*2)-1,red(),green()) --> If your value is 100%, the first section will return 1. If it is 50%, it will return 0. If it is 0%, it will return -1.


          Alternatively, you could try the ColorMix wizard, available from the Expression Editor's 'File' menu.