1*61c4878aSAndroid Build Coastguard Worker.. _module-pw_display: 2*61c4878aSAndroid Build Coastguard Worker 3*61c4878aSAndroid Build Coastguard Worker========== 4*61c4878aSAndroid Build Coastguard Workerpw_display 5*61c4878aSAndroid Build Coastguard Worker========== 6*61c4878aSAndroid Build Coastguard Worker.. pigweed-module:: 7*61c4878aSAndroid Build Coastguard Worker :name: pw_display 8*61c4878aSAndroid Build Coastguard Worker 9*61c4878aSAndroid Build Coastguard Worker.. attention:: 10*61c4878aSAndroid Build Coastguard Worker This module's initial implementation is informed by SEED :ref:`seed-0104`, 11*61c4878aSAndroid Build Coastguard Worker but is being reevaluated as it is migrated from `Pigweed's experimental 12*61c4878aSAndroid Build Coastguard Worker repsitory <https://pigweed.googlesource.com/pigweed/experimental/>`_. 13*61c4878aSAndroid Build Coastguard Worker 14*61c4878aSAndroid Build Coastguard Worker--------- 15*61c4878aSAndroid Build Coastguard WorkerLibraries 16*61c4878aSAndroid Build Coastguard Worker--------- 17*61c4878aSAndroid Build Coastguard Worker 18*61c4878aSAndroid Build Coastguard WorkerColor 19*61c4878aSAndroid Build Coastguard Worker----- 20*61c4878aSAndroid Build Coastguard Worker.. seealso:: 21*61c4878aSAndroid Build Coastguard Worker Color API: :ref:`module-pw_display-api-color` 22*61c4878aSAndroid Build Coastguard Worker 23*61c4878aSAndroid Build Coastguard WorkerThe color library defines base pixel format types and the `ColorRgba` class for 24*61c4878aSAndroid Build Coastguard Workerconverting between various types. 25*61c4878aSAndroid Build Coastguard Worker 26*61c4878aSAndroid Build Coastguard WorkerDisplay controllers often support a variety of data formats for representing a 27*61c4878aSAndroid Build Coastguard Workersingle pixel. For example: 28*61c4878aSAndroid Build Coastguard Worker 29*61c4878aSAndroid Build Coastguard Worker256 color grayscale: 30*61c4878aSAndroid Build Coastguard Worker 8 bits per pixel for a total of 256 shades of gray 31*61c4878aSAndroid Build Coastguard Worker4k color: RGB444 32*61c4878aSAndroid Build Coastguard Worker 12 bits total; 4 bits for each color: red, green, blue 33*61c4878aSAndroid Build Coastguard Worker65k color: RGB565 34*61c4878aSAndroid Build Coastguard Worker 16 bits total; 5 bits for red, 6 bits for green and 5 bits for blue 35*61c4878aSAndroid Build Coastguard Worker262k color: RGB666 36*61c4878aSAndroid Build Coastguard Worker 18 bits total; 6 bits for each color: red, green, blue 37*61c4878aSAndroid Build Coastguard Worker16.7M color: RGB888 38*61c4878aSAndroid Build Coastguard Worker 24 bits total; 8 bits for each color: red, green, blue 39*61c4878aSAndroid Build Coastguard Worker 40*61c4878aSAndroid Build Coastguard Worker.. note:: 41*61c4878aSAndroid Build Coastguard Worker ``pw_display`` drawing libraries will initially only operate on RGB565 pixels 42*61c4878aSAndroid Build Coastguard Worker for a few reasons: 43*61c4878aSAndroid Build Coastguard Worker 44*61c4878aSAndroid Build Coastguard Worker - 16 bits per color is easily represented as a single 16 bit unsigned 45*61c4878aSAndroid Build Coastguard Worker integer. No special framebuffer data packing logic is needed for 100% 46*61c4878aSAndroid Build Coastguard Worker memory utilization. 47*61c4878aSAndroid Build Coastguard Worker - RGB565 is 65k color which is a good compromise on color fidelity and memory 48*61c4878aSAndroid Build Coastguard Worker footprint. 49*61c4878aSAndroid Build Coastguard Worker - RGB565 has wide support by common display controllers used in the embedded 50*61c4878aSAndroid Build Coastguard Worker space. 51*61c4878aSAndroid Build Coastguard Worker 52*61c4878aSAndroid Build Coastguard Worker.. toctree:: 53*61c4878aSAndroid Build Coastguard Worker :hidden: 54*61c4878aSAndroid Build Coastguard Worker :maxdepth: 1 55*61c4878aSAndroid Build Coastguard Worker 56*61c4878aSAndroid Build Coastguard Worker api 57