RGB Case

The RGB Case node is a sophisticated comparison tool that identifies which color from a predefined list (A through H) most closely matches an incoming color. It is the logical engine behind puzzles where players must place colored objects in a specific order.
When to use this node:
* Color Recognition: Comparing a reading from a color sensor to a list of allowed "solution" colors.
* Noise Tolerance: Using the threshold property to allow for slight variations in sensor readings, ensuring the puzzle still works even if the sensor isn't perfectly calibrated.
* Feedback Systems: Reading the similarity output to drive a "hot or cold" meter, showing players how close their object's color is to the target.
Pro Tip:
The value output provides the index (0-7) of the matching color, which can be sent directly into a Case node to trigger different game events for different colors.
Connectors in
- RGB in [type: rgb]
- A [type: rgb]
- B [type: rgb]
- C [type: rgb]
- D [type: rgb]
- E [type: rgb]
- F [type: rgb]
- G [type: rgb]
- H [type: rgb]
Connectors out
- value [type: integer]
- similarity [type: integer]
Node properties
- A [type: rgb]
- B [type: rgb]
- C [type: rgb]
- D [type: rgb]
- E [type: rgb]
- F [type: rgb]
- G [type: rgb]
- H [type: rgb]
- threshold [type: integer]