Studio Yotsuba
Back to Node List

Levels

levels

Makes dark parts darker, light parts brighter, or compresses a selected value range.

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image whose contrast or mask strength will be adjusted.

Output Ports

NameTypeDescription
Image
output
Image
Image after the selected values were stretched or compressed.

Parameters

NameTypeDefaultRangeDescription / Options
Mode
mode
Enum
OKLCH-L—

Choose what value is adjusted: brightness, RGB channels, alpha, or grayscale luminance.

  • OKLCH-LOKLCH-L
    Adjust perceived brightness only.
  • RGBRGB
    Adjust red, green, and blue directly.
  • RGB-RRGB-R
    Adjust only red strength.
  • RGB-GRGB-G
    Adjust only green strength.
  • RGB-BRGB-B
    Adjust only blue strength.
  • HSV-VHSV-V
    Adjust HSV value, based on the strongest RGB channel.
  • AlphaAlpha
    Adjust transparency.
  • LuminanceLuminance
    Adjust RGB brightness and output grayscale.
Input Black
input_black
Float
00–1 / step 0.01

Move this upward to make more dark pixels become black.

Input White
input_white
Float
10–1 / step 0.01

Move this downward to make more bright pixels become white.

Gamma
gamma
Float
10.1–4 / step 0.01

Changes the middle tones without moving the black and white points. Below 1 darkens, above 1 brightens.

Output Black
output_black
Float
00–1 / step 0.01

Raises the darkest output. Increase it to keep shadows from becoming pure black.

Output White
output_white
Float
10–1 / step 0.01

Lowers the brightest output. Decrease it to keep highlights from becoming pure white.

Overview

Adjusts tonal separation in an image or mask. It can make dark areas darker and bright areas brighter, or keep values from reaching full black and white.

The default OKLCH-L adjusts perceived brightness naturally. Switch mode when you need direct RGB values, alpha-only adjustment, or HSV value.

Usage tips

  • The five values have distinct roles: input_black/white defines what becomes black/white and tightens the range; gamma below 1 darkens midtones while a value above 1 brightens them; output_black/white limits how far black/white can go.
  • It is ideal for noise → mask adjustment. Applying input_black/white to noise_generate output controls patch area and density intuitively, providing a softer middle ground than threshold.
  • Choose between this and tone_curve by shape: this node is faster for linear range adjustment, while a curve is better for an S-shape or other custom response.

Common pitfalls

  • Tones disappear from over-adjustment: bringing input_black and input_white too close approaches a binary result. Keep space between them unless that is intentional.
  • Input Black exceeds Input White: evaluation swaps them into ascending order and warns on both parameters. Reversing Output Black and Output White remains an intentional output inversion.
  • Colors look muddy: RGB mode also changes saturation. Keep the default OKLCH-L when only luminance should change.
  • The mask edge becomes hazy: raising output in Alpha mode makes the entire mask translucent. Use the input controls when the goal is a crisper edge.

Examples

  • Tighten character shadows with OKLCH-L so the pixel shapes read more clearly.
  • Use Alpha to make a translucent mask crisp.
  • Use output_black and output_white for a soft mask without crushed black or blown white.

Related nodes

  • tone_curve — a freely shaped tonal curve
  • auto_levels — adjust the range automatically
  • threshold — complete binarization
  • brightness — simple brightness increase/decrease
Back to Node List