# `Color`

Main color

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Value Summary

 Library wrapper for “`Colors`, `FillColor`, `LightColor`, `LineColor`, and `PointColor`” See below

## Description

`Color` refers to the “main color” of an object.

Depending on the object type, `Color` refers to the line color (e.g., `plot::Function2d`), the fill color (`plot::Surface`), the point color (`plot::Point2d`), the light color (`plot::PointLight`), or the one-and-only entry in `Colors` (`plot::Histogram2d`).

In general, the main color of an object is the first one available in the list

The following object types deviate from this general rule and choose the line color as main color: `plot::Arc2d`, `plot::Arc3d`, `plot::Circle2d`, `plot::Circle3d`, `plot::Ellipse2d`, `plot::Ellipse3d`, `plot::Ode2d`, `plot::Ode3d`, `plot::Parallelogram2d`, `plot::Polygon2d`, `plot::Polygon3d`, and `plot::Rectangle`. `plot::Sequence` uses `PointColor` as the main color.

### Note

`Color` is a library attribute and does not appear in the inspector.

## Examples

### Example 1

`Color` is useful for unified input of different object types:

```plot(plot::Function3d(sin(x-y/2), Color = RGB::Green), plot::Point3d([0, 0, 0], Color = RGB::Red), plot::Curve3d([x, 0, sin(x)], x = -6..6, LineWidth = 2*unit::mm, Color = RGB::Blue), Scaling = Constrained)```