Use custom colors to go beyond the default Desmos palette and add a personal touch to your graphs!
You can define colors using hue, saturation, and value parameters (HSV); or by specifying the amounts of red, green, and blue in the color (RGB). You can even create a list of colors to use with a list of objects! Check out the example graphs below, or read on for more details.
Defining a Custom Color
The expression c=hsv(230, 0.52, 0.7) defines a new color with a hue of 230°, 52% saturation, and a value of 70%.
The hue of a color is a number between 0 and 360, representing an angle on the chromatic circle. Note that by convention, this angle is always measured in degrees. Example: Hue gradient
The saturation of a color is a number between 0 and 1, describing how grey or “washed out” the color is. Example: Saturation gradient
Finally, the value of a color works together with hue and saturation to influence how bright the color appears: from 0 for black up to 1 for full brightness. Example: Value gradient
The expression c=rgb(86, 101, 179) defines a new color that is a mixture of 86 units red, 101 units green, and 179 units blue.
Each input to rgb() should be a number between 0 and 255. The red, green, and blue components act like colored lights: rgb(0,0,0) produces a black color, while rgb(255,255,255) will produce white.
Note that opacity can also influence the actual color that appears in the graph. (Example: Opacity and Color.)
Using a Custom Color
Once you have defined a custom color in the expression list and given it a name (left image, below), it will appear as an option in the style menu for any object (right image, below). Hover over the color swatch to see your name for this color.
If you are planning to share your graph with others, keep in mind that individuals often experience colors differently. We recommend aiming for a contrast level of at least 3:1 in your custom colors, and not relying on color alone to distinguish important elements of your graphs.