Back to Node List

Value Match

value_match

Checks whether two values match, based on the selected type

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
A
a
Number
Required
判定する1つ目の値です
B
b
Number
Required
判定する2つ目の値です

Output Ports

NameTypeDescription
結果
result
Bool
一致判定の結果です

Parameters

NameTypeDefaultRangeDescription / Options
判定する型
value_type
Enum
Number

A と B をどの型として判定するか選びます

  • 数値Number
    2つの数値を判定します
  • ON/OFFBool
    2つの ON/OFF を判定します
  • 文字Text
    2つの文字を判定します
  • Color
    2つの色を判定します
数値の判定
number_mode
Enum
Same

数値をどう判定するか選びます

  • 同じSame
    |A - B| が 1e-9 未満なら true です
  • 違うDifferent
    |A - B| が 1e-9 以上なら true です
  • ほぼ同じAlmostSame
    A と B の差が小さければ true です
  • ほぼ違うNotAlmostSame
    A と B の差が許容差より大きければ true です
ほぼ同じの幅
tolerance
Float
0.010–1000 / step 0.001

「ほぼ同じ / ほぼ違う」で使う許容差です

ON/OFFの判定
bool_mode
Enum
Same

ON/OFF をどう判定するか選びます

  • 同じSame
    A と B が同じなら true です
  • 違うDifferent
    A と B が違えば true です
文字の判定
text_mode
Enum
ExactSame

文字をどう判定するか選びます

  • 完全に同じExactSame
    2つの文字が完全に同じなら true です
  • 違うExactDifferent
    2つの文字が違えば true です
  • 大文字小文字を無視して同じIgnoreCaseSame
    大文字小文字を無視して同じなら true です
  • 大文字小文字を無視して違うIgnoreCaseDifferent
    大文字小文字を無視して違えば true です
色の判定
color_mode
Enum
RgbASame

色をどう判定するか選びます

  • 色も透明度も同じRgbASame
    色も透明度も同じなら true です
  • 色か透明度が違うRgbADifferent
    色か透明度が違えば true です
  • 色だけ同じRgbSame
    透明度を無視して色だけ同じなら true です
  • 色が違うRgbDifferent
    透明度を無視して色が違えば true です

What is it for?

  • When you want to check whether two strings are the same
  • When you want to check whether two colors are the same
  • When you want to check whether ON/OFF states match
  • When you want a simple approximate-equality check for numbers

Overview

Tests whether values, including non-numeric ones, are the same or different. compare handles numeric ordering, while this node handles text, color, and ON/OFF equality plus approximate numeric equality with a tolerance. Send the resulting Bool to switch / gate.

Usage tips

  • A useful rule is: ordering (>, <) = compare; equality or inequality = Value Match.
  • The most practical options are approximate equality (for floating-point rounding errors) and same color (compare colors while ignoring opacity).
  • Color tests work well with palette workflows. You can branch on a condition such as "if this pixel has the same color as palette index 2."

Related nodes

  • compare — numeric ordering
  • switch / gate — destinations for the result
  • expression_bool — write compound conditions as an expression

Per-type usage

Number

  • Equal
    • Returns true when |A - B| is less than the fixed threshold 1e-9.
  • Not Equal
    • Returns true when |A - B| is at least the fixed threshold 1e-9.
  • Approximately Equal
    • Returns true when the difference between A and B is at most Approximate Tolerance.
  • Approximately Not Equal
    • Returns true when the difference between A and B is greater than Approximate Tolerance.

ON / OFF

  • Equal
    • Returns true when A and B have the same state.
  • Not Equal
    • Returns true when A and B have different states.

Text

  • Exactly Equal
    • Returns true only when the strings match exactly.
  • Not Equal
    • Returns true when the strings differ.
  • Equal Ignoring Case
    • Ignores differences such as Fire versus fire.
  • Not Equal Ignoring Case
    • Returns true only when the strings still differ after ignoring case.

Color

  • Same Color and Opacity
    • Returns true only when all RGBA components match.
  • Different Color or Opacity
    • Returns true when either color or opacity differs.
  • Same Color Only
    • Compares only RGB and ignores opacity.
  • Different Color
    • Returns true when RGB differs, ignoring opacity.

Notes

  • Select the type before using this node.
  • Use Compare for numeric ordering.
  • Numeric Equal / Not Equal use the fixed 1e-9 threshold and do not read Approximate Tolerance. Choose an approximate mode only when you need a configurable tolerance.
  • For text comparison that should ignore uppercase / lowercase, change Text Match.
  • To ignore opacity in a color comparison, use Same Color Only / Different Color.

Examples

  1. Connect Text Input("Fire") and Text Input("fire"), then set Match Type = Text, Text Match = Equal Ignoring Case.
    • Treats Fire and fire as the same.
  2. Connect two Color Input nodes, then set Match Type = Color, Color Match = Same Color Only.
    • Returns true when the colors match even if their opacity differs.
  3. Connect two Number Input nodes, then set Match Type = Number, Number Match = Approximately Equal.
    • Treats slightly different values as the same.
  4. Connect the Value Match result to Switch.
    • This is the basic pattern for conditionally switching images, colors, or strings.
Back to Node List
Value Match — PixPipeline Node Reference