12
$\begingroup$

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:

enter image description here

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?

$\endgroup$
0

3 Answers 3

15
$\begingroup$

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.

screen recording

$\endgroup$
8
$\begingroup$
SystemDialogInput["Color"] // CopyToClipboard

Will do the Trick together with Copy/Past

enter image description here

$\endgroup$
7
$\begingroup$

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

picture

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.