Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know FrontEnd`SelectionSetStyle is undocumented, but its name suggests it does what I need. What is its syntax?

I have already tried several variations of the following button on some selected code in an input cell.

  FrontEnd`SelectionSetStyle[FontColor, RGBColor[{1, 0, 0}]];


Using the kernel, the following code does what I need:

 SetOptions[NotebookSelection[InputNotebook[]], FontColor -> RGBColor[{0, .7, .5}]]; 

I assume that FrontEnd`SelectionSetStyle can change the font color of the selection while using the front end only. If so, what is its syntax?

share|improve this question
After your update it is unclear what your question is. Can "what" be done in the front end only? – Mike Honeychurch Oct 18 '13 at 20:42
@MikeHoneychurch: I re-worded the question, thank you for the note. – Hector Oct 18 '13 at 22:12

Your assumptions are most probably wrong, it seems that this function is meant to change CellStyle.

e.g. use this code to convert Input cells to Title cells in current notebook:

 SelectionMove[#, All, Cell];
 MathLink`CallFrontEnd[FrontEnd`SelectionSetStyle[#, "Title"]]
   ) & /@ Cells[CellStyle -> "Input"]

Used here: Set the style of a cell (link corrected)

Found there: How can I get the style of a CellObject?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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