Lines Matching refs:dark
35 Instances of this class represent an immutable square grid of dark and light cells.
153 # The modules of this QR Code (False = light, True = dark).
227 for light or True for dark. The top left corner has the coordinates (x=0, y=0).
285 self._set_function_module(8, self._size - 8, True) # Always dark
465 # Balance of dark and light modules
466 dark: int = sum((1 if cell else 0) for row in modules for cell in row)
467 total: int = size**2 # Note that size is odd, so dark/total != 1/2
468 # Compute the smallest integer k >= 0 such that (45-5k)% <= dark/total <= (55+5k)%
469 k: int = (abs(dark * 20 - total * 10) + total - 1) // total - 1
583 if currentruncolor: # Terminate dark run