Label Colors

john's Avatar

john

03 Jun, 2025 02:34 AM

Here, as promised, is my new label_colors node.

Label_colors was designed to colorize the labels produced by my labelmaker node, but they will also work with any grouped label consisting of a container shape enclosing a textpath. In fact, it will work with any geometry object (e.g. balloons), though the results may be a bit odd.

Label_colors is to a list of labels as colorize is to a list of rects. Labels made with labelmaker will already have a uniform background color and contrasting text color. But in some situations, you may wish to assign different colors to different label containers. Or you may wish to override the contrasting colors automatically assigned by labelmaker.

Label_colors takes 7 parameters:

  • Label. A geometry (group) consisting of a container shape and a textpath.
  • Container Fill. The desired container fill color.
  • Container Stroke. The desired container stroke color.
  • Con. Stroke Width. The desired container stroke width.
  • Light Text. The text color when shown against a dark background.
  • Dark Text. The text color when shown against a light background.
  • Cutoff Percent. The luma value cutoff point between dark and light. I find 40% works pretty well in most situations.

The attached demo shows label_colors applied to two different kinds of labels.

The bottom labels, similar to the demo for labelmaker, shows a network of labels from a Lewis Carroll poem. The original labels were uniformly colored; label_colors turns each a different shade of yellow.

The top set of labels were formed by pairing blobs with text placed by my place_label node. Unlike the first example, these labels were already differently shaped and colored. Label_colors applies a new set of colors, matching the first example, and also changes the light and dark text color assignments.

By using label_colors with my other labeling systems you can quickly experiment and coordinate colors across complex designs.

Enjoy!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • label_colors_screenshot.png 694 KB
  • label_colors_demo.ndbx.zip 70.4 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Jun, 2025 06:15 AM
17 Jun, 2025 06:11 AM
16 Jun, 2025 02:18 AM
11 Jun, 2025 10:57 AM
11 Jun, 2025 09:53 AM

 

10 Jun, 2025 08:03 AM
10 Jun, 2025 01:33 AM
08 Jun, 2025 09:25 AM
08 Jun, 2025 09:19 AM
08 Jun, 2025 09:19 AM
08 Jun, 2025 09:18 AM