# How can we change the Highlighted elements to a specific color?

edit I don't want highlighting, only font color. Sorry. I want the Highlighted elements to be Blue Font. I can't understand this suggested previous post.

When I try to replace Highlighted with a Style, it doesn't change the list $$r.$$ Can you help?

Clear[m, n, s];
odd[n_] := 2 n - 1
rowSums[n_] := Module[{r = s[[1 ;; n]] + Reverse[s[[1 ;; n]]]},
Do[If[r[[m]] == 0 || OddQ[r[[m]]],
r[[m]] = Highlighted[r[[m]]]], {m, 1, Length[r]}]; r]
Array[rowSums, 20] // MatrixForm

• Try Highlighted[Style[r[[m]], Blue]]. – Rohit Namjoshi Sep 27 '19 at 21:01
• change Highlighted[r[[m]]] to Highlighted[r[[m]], BaseStyle -> Blue]? – kglr Sep 27 '19 at 21:08

Change Highlighted[r[[m]]] to

Style[r[[m]], 16, Blue, Bold]]


If you need the yellowish background, you can change Highlighted[r[[m]]] in your code to

 Highlighted[r[[m]], BaseStyle -> Directive[16, Blue, Bold]]


to get

• Or Highlighted[Style[r[[m]], Blue, Bold]]]. – Rohit Namjoshi Sep 27 '19 at 21:19
• The is good if we can get rid of the yellow. – Fred Kline Sep 27 '19 at 21:20
• Remove the Highlighted, just use Style[r[[m]], Blue, Bold]. Or Highlighted[Style[r[[m]], Blue, Bold], Background -> White]. – Rohit Namjoshi Sep 27 '19 at 21:22