Specifying colors in JpGraph

Colors can be specified in three different ways
  1. By using one of the, roughly, 400 pre-defined color names, e.g
     
    SetColor("khaki");

    A named color can also be modified by adding a adjustment factor. An adjustment factor, 0 < f < 1, a smaller value will give a darker version and a value of 0 or 1 will return the original color. A value > 1 will make the color brighter. A few examples
     

    SetColor("khaki:0.5"); // A darker version of "khaki"
    SetColor("yellow:1.2"); // A slightly lighter version of "yellow"

  2. By specifying a RGB triple, e.g.
     
    SetColor(array(65,100,176));

  3. By specifying the color as a hex string value
     
    SetColor("#A16BFF");

Available named colors

The chart below shows all available named colors.


Theme colors for pie:s

For more on how to use the different themes see Working with 2D & 3D pie plots
Theme 1: Earth

 
Theme 2: Pastel

 
Theme 3: Water

 
Theme 4: Sand