diff --git a/pyxel/examples/05_color_palette.py b/pyxel/examples/05_color_palette.py
index <HASH>..<HASH> 100755
--- a/pyxel/examples/05_color_palette.py
+++ b/pyxel/examples/05_color_palette.py
@@ -3,13 +3,13 @@ import pyxel
 
 def draw_palette(x, y, col):
     col_val = pyxel.colors[col]
-    hex_col = "#{:06X}".format(col_val)
-    rgb_col = "{},{},{}".format(col_val >> 16, (col_val >> 8) & 0xFF, col_val & 0xFF)
+    hex_col = f"#{col_val:06X}"
+    rgb_col = f"{col_val >> 16},{(col_val >> 8) & 0xFF},{col_val & 0xFF}"
 
     pyxel.rect(x, y, 13, 13, col)
     pyxel.text(x + 16, y + 1, hex_col, 7)
     pyxel.text(x + 16, y + 8, rgb_col, 7)
-    pyxel.text(x + 5 - (col // 10) * 2, y + 4, "{}".format(col), 7 if col < 6 else 0)
+    pyxel.text(x + 5 - (col // 10) * 2, y + 4, f"{col}", 7 if col < 6 else 0)
 
     if col == 0:
         pyxel.rectb(x, y, 13, 13, 13)
Changed to use f-strings