Yotsuba Games
Back to Node List

Levels

levels

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

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
็”ปๅƒ
input
Image
Required
ๆ˜Žๆš—ใ‚„ใƒžใ‚นใ‚ฏใฎๅผทใ•ใ‚’่ชฟๆ•ดใ—ใŸใ„็”ปๅƒใงใ™ใ€‚

Output Ports

NameTypeDescription
็”ปๅƒ
output
Image
้ธใ‚“ใ ๆˆๅˆ†ใฎๆ˜Žๆš—ใ‚’่ฉฐใ‚ใŸใ‚Šๅบƒใ’ใŸใ‚Šใ—ใŸ็”ปๅƒใงใ™ใ€‚

Parameters

NameTypeDefaultRangeDescription / Options
ๅฏพ่ฑก
mode
Enum
OKLCH-Lโ€”

ไฝ•ใ‚’่ชฟๆ•ดใ™ใ‚‹ใ‹ใ‚’้ธใณใพใ™ใ€‚่‡ช็„ถใชๆ˜Žๆš—ใชใ‚‰ OKLCH ๆ˜Žๅบฆใ€้€ๆ˜Žๅบฆใƒžใ‚นใ‚ฏใชใ‚‰ Alpha ใ‚’ไฝฟใ„ใพใ™ใ€‚

  • OKLCH ๆ˜ŽๅบฆOKLCH-L
    ่ฆ‹ใŸ็›ฎใฎๆ˜Žใ‚‹ใ•ใ ใ‘ใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚ๅฝฑใ‚„ใƒใ‚คใƒฉใ‚คใƒˆใ‚’่‡ช็„ถใซ็ท ใ‚ใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚
  • RGB ๅ…จไฝ“RGB
    ่ตคใƒป็ท‘ใƒป้’ใ‚’็›ดๆŽฅ่ชฟๆ•ดใ—ใพใ™ใ€‚่‰ฒใฎๆ•ฐๅ€คใ‚’ๅผทใๅค‰ใˆใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚
  • RGB ่ตคRGB-R
    ่ตคใฎๅผทใ•ใ ใ‘ใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚
  • RGB ็ท‘RGB-G
    ็ท‘ใฎๅผทใ•ใ ใ‘ใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚
  • RGB ้’RGB-B
    ้’ใฎๅผทใ•ใ ใ‘ใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚
  • HSV ๆ˜ŽๅบฆHSV-V
    HSV ใฎๆ˜Žๅบฆใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚ๅŽŸ่‰ฒใฎๅผทใ•ใ‚’ๅค‰ใˆใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚
  • ใ‚ขใƒซใƒ•ใ‚กAlpha
    ้€ๆ˜Žๅบฆใ‚’่ชฟๆ•ดใ—ใพใ™ใ€‚่–„ใ„ใƒžใ‚นใ‚ฏใ‚’ใใฃใใ‚Šใ•ใ›ใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚
  • ่ผๅบฆใ‚ฐใƒฌใƒผLuminance
    RGB ใ‹ใ‚‰ไฝœใฃใŸๆ˜Žใ‚‹ใ•ใ‚’่ชฟๆ•ดใ—ใ€็™ฝ้ป’็”ปๅƒใจใ—ใฆๅ‡บๅŠ›ใ—ใพใ™ใ€‚
ๅ…ฅๅŠ›้ป’
input_black
Float
00โ€“1 / step 0.01

ไธŠใ’ใ‚‹ใปใฉใ€ๆš—ใ„้ƒจๅˆ†ใŒใ‚ˆใ‚Š้ป’ใใคใถใ‚Œใพใ™ใ€‚ๅฝฑใ‚„ใƒžใ‚นใ‚ฏใฎ้ป’ๅดใ‚’็ท ใ‚ใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚

ๅ…ฅๅŠ›็™ฝ
input_white
Float
10โ€“1 / step 0.01

ไธ‹ใ’ใ‚‹ใปใฉใ€ๆ˜Žใ‚‹ใ„้ƒจๅˆ†ใŒใ‚ˆใ‚Š็™ฝใใชใ‚Šใพใ™ใ€‚ใƒใ‚คใƒฉใ‚คใƒˆใ‚„ใƒžใ‚นใ‚ฏใฎ็™ฝๅดใ‚’ๅผทใ‚ใŸใ„ๆ™‚ใซไฝฟใ„ใพใ™ใ€‚

ใ‚ฌใƒณใƒž
gamma
Float
10.1โ€“4 / step 0.01

้ป’ใจ็™ฝใฎไฝ็ฝฎใฏไฟใฃใŸใพใพใ€ไธญ้–“ใฎๆ˜Žใ‚‹ใ•ใ‚’ๅ‹•ใ‹ใ—ใพใ™ใ€‚1 ๆœชๆบ€ใงไธญ้–“ใŒๆš—ใใ€1 ใ‚ˆใ‚Šๅคงใใ„ใจๆ˜Žใ‚‹ใใชใ‚Šใพใ™ใ€‚

ๅ‡บๅŠ›้ป’
output_black
Float
00โ€“1 / step 0.01

้ป’ใจใ—ใฆๅ‡บใ™ๅ€คใงใ™ใ€‚ไธŠใ’ใ‚‹ใจใ€็œŸใฃ้ป’ใซใชใ‚‰ใšๅฐ‘ใ—ๆ˜Žใ‚‹ใ„้ป’ใซใชใ‚Šใพใ™ใ€‚

ๅ‡บๅŠ›็™ฝ
output_white
Float
10โ€“1 / step 0.01

็™ฝใจใ—ใฆๅ‡บใ™ๅ€คใงใ™ใ€‚ไธ‹ใ’ใ‚‹ใจใ€็œŸใฃ็™ฝใซใชใ‚‰ใšๅฐ‘ใ—ๆš—ใ„็™ฝใซใชใ‚Šใพใ™ใ€‚

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
Levels โ€” PixPipeline Node Reference