adding colours to highlight menu

Everything related to our flagship word processor.
Post Reply
Posts: 124
Joined: 2005-01-23 17:12:16

adding colours to highlight menu

Post by ngazidja » 2011-01-07 01:46:46

I can't find anything in the manual - how do I add a colour to the Format>Highlight menu (or change one that's there, eg "Highlight Colour #1")?



Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: adding colours to highlight menu

Post by Groucho » 2011-01-07 02:57:46

Hello, lain.

Go to Preferences and click on the Appearance tab. Click on Highlighters. That’s where you can customize colors. You can’t add new ones, though, not that I know.

Greetings, Henry.

Posts: 400
Joined: 2008-05-17 04:02:32

Re: adding colours to highlight menu

Post by Kino » 2011-02-07 09:45:43

Two postings calling for more highlight colours in such a short period!?! Personally I’m not using highlight colours a lot. One or two at the most in a single document. Well, personally I don’t need this macro but I wrote it ‘cause it’s easy ;-)
(4.99 KiB) Downloaded 220 times
This macro enables you to create and use a custom highlight colour palette/dialog. It can be used also for text colours or background colours if you modify it a bit (see comments at the beginning of the macro).

As I don’t know what colours are appropriate as highlight colours, I gathered all Pale/Pastel colours from a wiki article:

As you see, you can customize the macro very easily. Just add $colors{'Color Name'} = 'HexTriplet' for your favourite colours and/or remove existing definitions. The only limitation is that imposed by the vertical resolution of your display monitor.

BTW, when I switched from an old G4 Mac to Mac mini Core 2 Duo at 2 GHz with NVIDIA GeForce 9400, I was very pleased to find ‘Rotatin 90°’ to be useable. IMO, dual portrait display monitors is one of the most productive display monitor settings.


Code: Select all

# Works on selection(s).

# To customize $colors, it would be handy to use a colour chart with RGB hex values,
# for example,

# You can use this macro for applying Text Color, Background Color, or Highlight Color.
# Enable one of Set {Text,Background,Highlight} Color commands near the end of the macro
# and disalble the others by commenting them out.

$doc =
if $doc == undefined

$sels = $doc.textSelections
if ! $sels.firstValue.length
	exit 'Nothing selected, exiting . . .'

$colors =
$colors{'Pale Aqua'} = 'BCD4E6'
$colors{'Pale Blue'} = 'AFEEEE'
$colors{'Pale Brown'} = '987654'
$colors{'Pale Carmine'} = 'AF4035'
$colors{'Pale Cerulean'} = '9BC4E2'
$colors{'Pale Chestnut'} = 'DDADAF'
$colors{'Pale Copper'} = 'DA8A67'
$colors{'Pale Cornflower Blue'} = 'ABCDEF'
$colors{'Pale Gold'} = 'E6BE8A'
$colors{'Pale Goldenrod'} = 'EEE8AA'
$colors{'Pale Green'} = '98FB98'
$colors{'Pale Magenta'} = 'F984E5'
$colors{'Pale Pink'} = 'FADADD'
$colors{'Pale Plum'} = 'DDA0DD'
$colors{'Pale Red-Violet'} = 'DB7093'
$colors{'Pale Robin Egg Blue'} = '96DED1'
$colors{'Pale Silver'} = 'C9C0BB'
$colors{'Pale Spring Bud'} = 'ECEBBD'
$colors{'Pale Taupe'} = 'BC987E'
$colors{'Pale Violet-Red'} = 'DB7093'
$colors{'Pastel Blue'} = 'AEC6CF'
$colors{'Pastel Brown'} = '836953'
$colors{'Pastel Gray'} = 'CFCFC4'
$colors{'Pastel Green'} = '77DD77'
$colors{'Pastel Magenta'} = 'F49AC2'
$colors{'Pastel Orange'} = 'FFB347'
$colors{'Pastel Pink'} = 'FFD1DC'
$colors{'Pastel Purple'} = 'B39EB5'
$colors{'Pastel Red'} = 'FF6961'
$colors{'Pastel Violet'} = 'CB99C9'
$colors{'Pastel Yellow'} = 'FDFD96'

$lang = Language.systemLanguage
$names = $colors.keys
$names.sort 'li', $lang

$name = Prompt Options 'Apply on selection(s) . . .', '', '', $names

$color = Color.newWithHexTriplet $colors{$name}
Push Target Selection $sels
#	Set Text Color $color
#	Set Background Color $color
	Set Highlight Color $color
Pop Target Selection
EDIT: There was a bug in the macro (undefined variable) in the code and the attached file. Also I seem to have attached the same attachment twice.

User avatar
Posts: 158
Joined: 2009-05-21 11:53:23
Location: Midway through infinity (or Ottawa, Canada).

Re: adding colours to highlight menu

Post by Jester » 2011-02-08 11:38:43


Haha the thing is that when you're writing a thesis you need diverse colours to prioritise what needs to be corrected. I only wanted new colours since I found the old ones too "loud" and boring, but I'll try this macro and add new ones.

Me is very thankful to you.

User avatar
Official Nisus Person
Posts: 4453
Joined: 2002-07-11 17:14:10
Location: San Diego, CA

Re: adding colours to highlight menu

Post by martin » 2011-02-08 13:17:05

If you don't like the default highlighting colors at all, I'd visit your NWP preferences and alter those (as Henry mentioned), so you never see them again.

And although Kino's macro is very nice (as always), if you need more than 6 highlight colors, personally I might choose to add some new character styles to my document instead. You can set the highlight color of those styles in your stylesheet for a consistent look.

Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: adding colours to highlight menu

Post by Groucho » 2011-02-12 13:03:50

By the way, it would be useful – to me at least – if the highlighter could turn into a temporary tool, like in Preview: double-click, or command-click, and then every text you select is highlighted. Click again and you’re back to the caret. This might be better than select text and click the icon, esp. when you need to select a lot of discontinuous text.

Cheers, Henry.

Post Reply