# Enter colors directly into notebook?

In Mathematica notebook interface, you can evaluate:

In[1]:= Black


and you get a colored squared representing the color. Then I can copy and paste this color square and use it as input, like so:

which I find very readable. However I would like to be able to enter the blue square directly, instead of having to enter and evaluate Blue in a separate cell to get to the square.

Is there a key combination (similar to the usual Esc + a + Esc to get greek letters) to get the color boxes?

You can get the colour swatch to appear as follows:

1. Type the symbol Black.
2. Press and hold down the CTRL and SHIFT keys.
3. Type to select the previous word.
4. Type ENTER to evaluate it in place.
5. Release the modifier keys.

SystemDialogInput["Color"] // CopyToClipboard


Will do the Trick together with Copy/Past

As Kuba noted in a comment you can use the menu command Evaluation >> Evaluate in Place