Neural Sketch

Color Palette

A guided overview of Neural-Sketch’s default and customizable color scheme

Introduction

A cohesive color scheme plays a pivotal role in producing publication-ready diagrams. Neural-Sketch offers a carefully curated palette crafted to ensure clarity, high contrast, and visual harmony across diverse shapes, containers, and annotated elements. By default, the package provides a handpicked array of tints—ranging from tranquil blues and oranges to subdued grays with soft pastel accent colors.

In typical usage, you can apply these colors easily by referencing their names—such as nskBlue or nskGray—in your shape or container definitions. Additionally, you can override or extend the palette to align with institutional or personal style guidelines.

Neural-Sketch Color Palette

Default Color Names

Neural-Sketch ships with a variety of built-in colors, each stored under a descriptive name—e.g., nskBlue or nskDarkGray. Internally, these macros point to carefully blended RGB or HTML hex values that have been selected to stand out elegantly in conference proceedings or journal publications. The typical naming structure resembles:

  • Primary Accents: nskMainAccent, nskSecondaryAccent.
  • Basic Tones: nskBlue, nskOrange, nskRed, nskGreen, etc.
  • Gray Tones: nskDarkGray, nskLightGray, nskLightestGray, among others.
  • Supplementary Accents: nskCyan, nskLime, nskMagenta, etc.
  • Strong Hues: nskStrongBlue, nskStrongRed.

The naming convention is self-explanatory and helps you recognize each color’s intensity and purpose. For example, nskDarkGray is a dark shade ideal for borders or containers, whereas nskLightestGray is best used for subtle backgrounds.

Applying Colors

Employ colors simply by assigning them to style keys or to the fill= or text= properties when defining shapes or containers. For instance:

\nskBlock[
  id=exampleBlock,
  fill=nskBlue, 
  border-color=nskDarkGray, 
  text-north={\textbf{Blue Block}}
]

Neural-Sketch automatically takes care of any required transformations or style expansions, ensuring that the blocks (and text anchors) display the correct color.

Naming Conventions

neural-sketch employs a clear, standardized naming convention for all provided colors:

  • Prefix: All colors are prefixed with nsk, denoting their origin from the Neural-Sketch palette.
  • PascalCase: Following the prefix, the color name uses PascalCase, clearly denoting its identity and purpose, such as nskBlue, nskDarkGray, or nskMainAccent.

Example: To apply a red in a diagram, you would use:

\nskBlock[
  fill=nskRed!50,
  border-color=nskDarkGray
]

Color Mixing and Blending

Color definitions fully support TikZ's built-in color mixing syntax via the ! operator, enabling you to quickly create customized shades of any predefined color.

Basic Usage

To create a custom tint, simply append !<percentage> to any neural-sketch color:

\nskBlock[
  fill=nskBlue!30, % 30% of nskBlue mixed with 70% white
  border-color=nskDarkGray!75 % 75% of nskDarkGray mixed with 25% white
]

This syntax smoothly generates lighter shades, ideal for creating subtle highlights or nuanced diagram styling.

How the ! Operator Works

The general syntax is:

<base-color>!<percentage>[!<other-color>]

where,

  • <base-color>: Any predefined Neural-Sketch color (e.g., nskRed, nskLightGray).
  • <percentage>: An integer (0–100) indicating the proportion of the <base-color> in the mix.
  • <other-color> (optional): The secondary color mixed with the base. If omitted, white is implicitly used.

Examples

Mixing with White (Default)
% Light pastel red (50% red, 50% white)
\nskBlock[
  fill=nskRed!50,
]
Mixing with Another Color

You can mix two distinct colors directly:

% Purple shade (60% blue, 40% red)
\nskBlock[
  fill=nskBlue!60!nskRed,
]

Tips

  • Subtle Highlights: Use nsk<color>!50 to gently highlight backgrounds.
  • Visual Hierarchy: Clearly distinguish related diagram elements using incremental percentages (e.g., nskGreen!30, nskGreen!60, nskGreen!90).
Advanced Example (Shades)

Here’s how a visually cohesive yet distinct diagram can be created using incremental shades:

examples/shades.tex
\foreach \s in {20, 40,...,100} {
    \nskBlock[
      last-pos-s={right=0.5cm},
      fill={nskMainAccent!\s},
      text-north={\s},
    ]
  }

This produces a smooth gradient sequence from very a light nskMainAccent!20 to full intensity nskMainAccent!100, ideal for illustrating progression, intensity, or hierarchy clearly and attractively.

Neural-Sketch Color Palette

Color Reference

Below are listed the currently provided colors

NameAliasInvertableVarianthex code
c__nsk_main_accent_clrnskMainAccenttruenormal#e8d4ff
c__nsk_main_accent_inv_clr-trueinverse#e8d4ff
c__nsk_secondary_accent_clrnskSecondaryAccenttruenormal#d6ebff
c__nsk_secondary_accent_inv_clr-trueinverse#2e3e4d
c__nsk_dark_gray_clrnskDarkGraytruenormal#666666
c__nsk_dark_gray_inv_clr-trueinverse#9d937b
c__nsk_mid_gray_clrnskMidGraytruenormal#6e695a
c__nsk_mid_gray_inv_clr-trueinverse#a3a3a3
c__nsk_light_gray_clrnskLightGraytruenormal#f0f0f5
c__nsk_light_gray_inv_clr-trueinverse#33332d
c__nsk_lighter_gray_clrnskLighterGraytruenormal#bcbcbf
c__nsk_lighter_gray_inv_clr-trueinverse#5b574b
c__nsk_lightest_gray_clrnskLightestGraytruenormal#f8f8f9
c__nsk_lightest_gray_inv_clr-trueinverse#2d2d2b
c__nsk_shadow_clrnskShadowtruenormal#d2d2d2
c__nsk_shadow_inv_clr-trueinverse#4a4840
c__nsk_red_clrnskRedtruenormal#ff99a1
c__nsk_red_inv_clr-trueinverse#4d2e30
c__nsk_pink_clrnskPinktruenormal#ffccee
c__nsk_pink_inv_clr-trueinverse#663d58
c__nsk_blue_clrnskBluetruenormal#a0d0d0
c__nsk_blue_inv_clr-trueinverse#264040
c__nsk_green_clrnskGreentruenormal#9bff99
c__nsk_green_inv_clr-trueinverse#74285f
c__nsk_yellow_clrnskYellowtruenormal#ffff99
c__nsk_yellow_inv_clr-trueinverse#28285f
c__nsk_orange_clrnskOrangetruenormal#ffcf99
c__nsk_orange_inv_clr-trueinverse#284a5f
c__nsk_lime_clrnskLimetruenormal#bdff99
c__nsk_lime_inv_clr-trueinverse#5a285f
c__nsk_cyan_clrnskCyantruenormal#99fffc
c__nsk_cyan_inv_clr-trueinverse#76282a
c__nsk_magenta_clrnskMagentatruenormal#ff4db8
c__nsk_magenta_inv_clr-trueinverse#28a54e
c__nsk_brown_clrnskBrowntruenormal#664729
c__nsk_brown_inv_clr-trueinverse#332414
c__nsk_strong_blue_clrnskStrongBluetruenormal#005afd
c__nsk_strong_blue_inv_clr-trueinverse#eb9c29
c__nsk_strong_red_clrnskStrongRedtruenormal#d91900
c__nsk_strong_red_inv_clr-trueinverse#45c9b2
c__nsk_strong_purple_clrnskStrongPurpletruenormal#6545d5
c__nsk_strong_purple_inv_clr-falsenormal#6545d5
c__nsk_medium_white_clrnskMediumWhitefalsenormal#b0b2c1
c__nsk_dark_bg_clrnskDarkBgfalsenormal#1d2021
c__nsk_cream_white_clrnskCreamWhitefalsenormal#ebdbb2

On this page