WS2812 GRB Byte Order Check

Serialize actual RGB bytes into declared WS2812 GRB order and audit observed sequence including missing/extra bytes; no electrical timing, chip-variant auto-detection or hardware write is performed.

Description

WS2812 GRB serialization sends green before red and blue.

WS2812 GRB serialization sends green before red and blue. An observed stream can have wrong values or wrong length.1

Enter nonempty three-column integer RGB bytes 0–255 and observed integer bytes 0–255. Construct GRB sequence and compare through the longer stream. Return expected bytes, zero-based mismatches including missing/extra positions and length flag.

When to use WS2812 GRB Byte Order Check

Use WS2812 GRB Byte Order Check when you need to evaluate the supplied records under the calculation and evidence rules below. No electrical timing, chip-variant detection or hardware write is performed.

Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.

How to use WS2812 GRB Byte Order Check and understand its results

  1. Prepare colors in the stated color space and scale. Use encoded RGB fractions, linear RGB, Lab, xy, byte values or ink percentages exactly as requested; supply caller tolerances and reference conditions.
  2. Enter rgbByteTriples, observedWireBytes using the field table and calculation rules, then run the tool.
  3. Read expectedGrbWireBytes, mismatchedWireByteIndices, observedByteCountMatches. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
rgbByteTriplesRgb byte tripleslist of list of numberRequired
observedWireBytesObserved wire byteslist of numberRequired

Enter nonempty three-column integer RGB bytes 0–255 and observed integer bytes 0–255. Construct GRB sequence and compare through the longer stream. Return expected bytes, zero-based mismatches including missing/extra positions and length flag.

expected=flatten([green,red,blue] for each RGB row)

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
expectedGrbWireBytesExpected grb wire byteslist of number
mismatchedWireByteIndicesMismatched wire byte indiceslist of number
observedByteCountMatchesObserved byte count matchesboolean
json
{
  "input": {
    "rgbByteTriples": [
      [
        10,
        20,
        30
      ],
      [
        255,
        0,
        1
      ]
    ],
    "observedWireBytes": [
      20,
      10,
      30,
      0,
      255,
      1
    ]
  },
  "output": {
    "expectedGrbWireBytes": [
      20,
      10,
      30,
      0,
      255,
      1
    ],
    "mismatchedWireByteIndices": [],
    "observedByteCountMatches": true
  }
}

Limitations and assumptions

No electrical timing, chip-variant detection or hardware write is performed.

Numeric inputs, where present, must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Matrices are limited to 128 rows and 128 entries per row. Numeric lists are limited to 10,000 entries; string lists to 128 strings of at most 128 characters each. The rules above may impose smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use LED PWM Duty Cycle Gamma 2.2 Brightness: A gamma 2.2 power heuristic maps target brightness to PWM duty. A device’s actual response requires calibration. For a complementary task, use Game Boy DMG Four-Tone Palette Map: Game Boy BGP packs four two-bit shade mappings into one byte. Pixel codes index the supplied mapping.

References

  1. WS2812 GRB Byte Order Check — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies