Reply to topic  [ 6 posts ] 
adding colours to highlight menu 
Author Message

Joined: 2005-01-23 17:12:16
Posts: 122
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")?

Thx

Iain.


2011-01-07 01:46:46
Profile

Joined: 2007-03-03 09:55:06
Posts: 494
Location: Europe
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.


2011-01-07 02:57:46
Profile

Joined: 2008-05-17 04:02:32
Posts: 400
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 ;-)
Attachment:
CustomColorPalette_20110208_nwm.zip [4.99 KiB]
Downloaded 200 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:
http://en.wikipedia.org/wiki/List_of_colors

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.

Kino
Code:
# Works on selection(s).

# To customize $colors, it would be handy to use a colour chart with RGB hex values,
# for example, http://en.wikipedia.org/wiki/List_of_colors.

# 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 = Document.active
if $doc == undefined
   exit
end

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

$colors = Hash.new
$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.


2011-02-07 09:45:43
Profile
User avatar

Joined: 2009-05-21 11:53:23
Posts: 158
Location: Midway through infinity (or Ottawa, Canada).
ME LOVES HIGHLIGHTING!

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.

_________________
Translation for you:

http://paralleltranslations.ca/translation/


2011-02-08 11:38:43
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2011-02-08 13:17:05
Profile WWW

Joined: 2007-03-03 09:55:06
Posts: 494
Location: Europe
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.


2011-02-12 13:03:50
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software