# COLOR in AutoCAD

> How AutoCAD's COLOR (COL) sets the colour of new objects: ByLayer, an index colour by name or number, or a true colour in RGB. Try it free in your browser.

COLOR sets the colour new objects are drawn with. AutoCAD opens the Select Color dialog; MellowCAD has none yet, so COLOR runs the command-line form AutoCAD has too, `-COLOR`. It asks for the default object colour, offering the current one, `BYLAYER` in a new drawing: ByLayer means each object takes its layer's colour, and a colour chosen instead is the object's own. Type an index colour's number or its name, or choose `Truecolor`. Enter keeps the current colour, and the change is a step that `U` takes back.

A word it cannot read says `A color number or standard color name is required.`, and 0, a negative number or one past 255 `Invalid color number.`; it asks again. Typed with an apostrophe inside a command, `'COLOR`, each object drawn after it takes the new colour: each segment of a [`LINE`](https://mellowcad.com/docs/commands/line.md) takes the colour current as it starts. COLOR sets only what comes next; the Properties palette or the top bar's colour list changes objects already drawn.

- **Command:** `COLOR`
- **Aliases:** `COL`, `COLOUR`
- **Panel:** [Organize](https://mellowcad.com/docs/commands.md#organize)
- **Try it:** [Open the editor](/draw), type `COL` and press Enter.

## At the command line

The engine draws it and writes its history as you would type it: the prompts in AutoCAD 2027's order, with the same option letters.

A plate drawn ByLayer, its hole in red, its bore in the true colour 0,128,255, then COLOR set back to ByLayer.

```text
Command: COLOR
Enter default object color [Truecolor] <BYLAYER>: R
Command: CIRCLE
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: 50,30
Specify radius of circle or [Diameter]: 18
Command: COLOR
Enter default object color [Truecolor] <1 (red)>: T
Red,Green,Blue: 0,128,255
Command: CIRCLE
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: 50,30
Specify radius of circle or [Diameter] <18.00>: 8
Command: COLOR
Enter default object color [Truecolor] <0,128,255>: BYL
```

## Options

### `Truecolor` (`T`)

Asks for a colour as three values from 0 to 255, red, green and blue, separated by commas with no space: `0,128,255` is a mid blue. A colour that is also an index colour, `255,0,0`, is stored as that index colour.

### `BYLayer` (`BYL`)

New objects take their layer's colour, as they do at first.

### `Red` (`R`)

Index colour 1, also typed as `1`.

### `Yellow` (`Y`)

Index colour 2, also typed as `2`.

### `Green` (`G`)

Index colour 3, also typed as `3`.

### `Cyan` (`C`)

Index colour 4, also typed as `4`.

### `Blue` (`B`)

Index colour 5, also typed as `5`.

### `Magenta` (`M`)

Index colour 6, also typed as `6`.

### `White` (`W`)

Index colour 7, also typed as `7`: white on a dark background and black on a light one.

## What it does not do yet

The Select Color dialog, Color Books and the HSL form. The index colours 8 to 255: only 1 to 7 are taken. ByBlock. A true colour that matches an index colour is stored as that index colour, where AutoCAD keeps the RGB. Transparency (CETRANSPARENCY), and the per-type defaults HPCOLOR, HPLAYER, DIMLAYER and TEXTLAYER.

[What it does and still lacks, in detail (in English)](https://github.com/ovelilla/mellowcad/blob/main/docs/coverage/properties.md#colour--color--col--colour---color--es-color--col---color--pt-br-cor--c--colour--cordiag---cor)

## Questions

### What is the shortcut for COLOR in AutoCAD?

`COL`, then Enter or Space; `COLOUR` too. The full name works as well, and `_COLOR` in any language of AutoCAD.

### How do I change the color of an object in AutoCAD?

Select it and choose the colour in the top bar's colour list or in the Color row of the Properties palette: it changes in one step. Or copy another object's colour with [`MATCHPROP`](https://mellowcad.com/docs/commands/matchprop.md). COLOR only sets the colour of objects drawn after it.

### What does ByLayer mean in AutoCAD?

That the object takes its layer's colour, so changing the layer's colour in the Layer Properties Manager changes every ByLayer object on it. It is the default, and keeps a drawing's colours organised by layer: [`LAYER`](https://mellowcad.com/docs/commands/layer.md).

### How do I use RGB colors in AutoCAD?

Choose `Truecolor` and type the three values separated by commas, such as `0,128,255`.

## Related commands

- [LAYER in AutoCAD](https://mellowcad.com/docs/commands/layer.md)
- [PROPERTIES in AutoCAD](https://mellowcad.com/docs/commands/properties.md)
- [MATCHPROP in AutoCAD](https://mellowcad.com/docs/commands/matchprop.md)
- [LINETYPE in AutoCAD](https://mellowcad.com/docs/commands/linetype.md)
- [LWEIGHT in AutoCAD](https://mellowcad.com/docs/commands/lweight.md)
