-**color_palette** (*Optional*): The type of color pallet that will be used in the ESP's internal 8-bits-per-pixel buffer. This can be used to improve color depth quality of the image. For example if you know that the display will only be showing grayscale images, the clarity of the display can be improved by targeting the available colors to monochrome only. Options are:
-**color_palette_images** (*Optional*): A list of image files that will be used to generate the color pallet for the display. This should only be used in conjunction with ``-color_palette: IMAGE_ADAPTIVE`` above. The images will be analysed at compile time and a custom color pallet will be created based on the most commonly occuring colors. A typical setting would be a sample image that represented the fully populated display. This can significantly improve the quality of displayed images. Note that these images are not stored on the ESP device, just the 256byte color pallet created from them.
-**dimensions** (*Optional*): Dimensions of the screen, specified either as *width***x***height* (e.g ``320x240``) or with separate config keys. If not provided the dimensions will be determined by the model selected.
-**height** (**Required**, int): Specifies height of display in pixels.
-**width** (**Required**, int): Specifies width of display.
-**offset_width** (*Optional*, int): Specify an offset for the x-direction of the display, typically used when an LCD is smaller than the maximum supported by the driver chip. Default is 0
-**offset_height** (*Optional*, int): Specify an offset for the y-direction of the display. Default is 0.
-**invert_colors** (*Optional*): With this boolean option you can invert the display colors.
-**pixel_mode** (*Optional*): Allows forcing the display into 18 or 16 bit mode. Options are ``18bit`` or ``16bit``. If unspecified, the pixel mode will be determined by the model choice. Not all displays will work in both modes.
-**rotation** (*Optional*): Rotate the display presentation in software. Choose one of ``0°``, ``90°``, ``180°``, or ``270°``. This option cannot be used with ``transform``.
-**transform** (*Optional*): Transform the display presentation using hardware. All defaults are ``false``. This option cannot be used with ``rotation``.
-**swap_xy** (*Optional*, boolean): If true, exchange the x and y axes.
-**mirror_x** (*Optional*, boolean): If true, mirror the x axis.
-**mirror_y** (*Optional*, boolean): If true, mirror the y axis.
To modify the SPI setting see :ref:`SPI bus <spi>` . The default **data_rate** is set to ``40MHz`` and the **spi_mode** mode is ``MODE0`` but some displays require ``MODE3`` (*).
**Note:** The maximum achievable data rate will depend on the chip type (e.g. ESP32 vs ESP32-S3) the pins used (on ESP32 using the default SPI pins allows higher rates) and the connection type (on-board connections will support higher rates than long cables or DuPont wires.) If in doubt, start with a low speed and test higher rates to find what works. A MISO pin should preferably not be specified, as this will limit the maximum rate in some circumstances, and is not required if the SPI bus is used only for the display.
The ``init_sequence`` option allows additional configuration of the driver chip. Provided commands will be sent to the
driver chip in addition to, and after the chosen model's pre-defined commands. It requires a list of byte sequences:
..code-block:: yaml
init_sequence:
- [ 0xD0, 0x07, 0x42, 0x18]
- [ 0xD1, 0x00, 0x07, 0x10]
Each entry represents a single-byte command followed by zero or more data bytes.
CUSTOM model
************
The ``CUSTOM`` model selection is provided for otherwise unsupported displays, and requires both ``dimensions:`` and ``init_sequence:`` to be specfied. There is no pre-defined init sequence.