ESP32-C3 Mini OLED - Change the color of the TEXT

Hi

I would like to change the colour of the text. I have tried many variations but I cannot get it to work.

# Display settings
display:
  - platform: ssd1306_i2c
    model: "SSD1306 72x40"
    id: my_display
    rotation: 0
    update_interval: 1s  
    offset_y: 0
    offset_x: 0
    brightness: 100%
    contrast: 100%
    invert: false
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(my_font), "%s", "TEST-02");
 

# Font
font:
  - file: "gfonts://Roboto"
    id: my_font
    size: 20

# Define the onboard LED
output:
  - platform: gpio
    pin: GPIO8
    id: onboard_led

# Flashing the onboard LED
interval:
  - interval: 1s
    then:
      - output.turn_on: onboard_led
      - delay: 500ms

I assume all that mini OLED screens only have one color, so you might have to buy another one in a different color :slight_smile:

Define a color and use it with the text.

color:
  - name: my_red
    red: 100%


....
.....


    it.printf(0, 0, id(my_font), id(my_red), "%s", "TEST-02" );
    

I am getting this error. I tried green and also yellow:


Thanks

I tired this but the panel does not change color:

The OLED does support green and yellow.

Thanks

I only know split color ssd1306’s, where a part of the screen is color A and the other part color B, but you can’t change te color of that part. see also: SSD1306-Based OLED Display - DONE.LAND.

Hi, thanks from the info. When I got them, it was yellow and blue. However, now it is just white. Any way I can get the blue and yellow to work even if it is yellow at the top and blue at the bottom.

Thanks

No idea, they’re monochrome, so they can’t change color. You’re talking about “them”, which sounds like more than one. Maybe you have both a white and a blue/green one and accidentally mixed them up?