VISUAL NEURAL NETWORK

Choose a background color. The neural network calculates, neuron by neuron, whether the text should be white or black for better contrast. Follow the real math step by step.

Text Result

Step-by-step math

1. Input (normalized RGB)
Each color channel (0–255) is divided by 255 to produce a value between 0 and 1.
Not processed yet. Click “Run network”.
2a. Hidden Neuron H0
sum = (R × weight) + (G × weight) + (B × weight) + bias
Waiting...
2b. Hidden Neuron H1
sum = (R × weight) + (G × weight) + (B × weight) + bias
Waiting...
2c. Hidden Neuron H2
sum = (R × weight) + (G × weight) + (B × weight) + bias
Waiting...
3. Output Neuron
sum = (H0 × weight) + (H1 × weight) + (H2 × weight) + bias
Waiting...
4. Decision
If probability > 50% → WHITE text; otherwise → BLACK text.
Waiting...
Waiting...
View neural network weights

These weights are set to decide color contrast (white vs. black).

RGBBias
H0-3.0-6.0-1.0+5.0
H10.0-2.0+3.0-1.0
H2+2.0+4.0-1.0-2.0
H0H1H2Bias
Output+4.0+1.5-3.0-1.0

sigmoid(x) = 1 / (1 + e-x) — compresses any value into the interval (0, 1).