Skip to content

Styles ​

This page is part of the GenPy Ren'Py learning path. It focuses on practical Ren'Py 8.x production and links each concept back to the GenPy workflow.

Learning goals ​

  • Understand style names and inheritance.
  • Adjust style properties without scattering visual constants.
  • Know when GUI variables are better than raw style edits.

Core syntax ​

  • style
  • is
  • xalign
  • background
  • text style
  • style prefix

Runnable example ​

text
style my_text:
    color "#ffffff"
    size 28
    font "fonts/SourceHanSansSC-Regular.otf"
    outlines [(2, "#000000", 0, 0)]

Study outline ​

  • Start with the smallest example for styles.
  • Test the key terms in a clean Ren'Py project: style, is, xalign, background.
  • Move the pattern back into your real project only after the example runs.
  • Use GenPy docs and validation to keep the feature connected to story, assets, and export readiness.

Common pitfalls ​

  • Test the smallest working script before layering on visual or UI complexity.
  • Run Ren'Py Lint before release builds, even when the script appears to run locally.
  • Keep examples in standard .rpy files so they remain editable outside GenPy.

Official references ​

How this fits in GenPy ​

  • Use GenPy GUI Theme docs before editing many style properties by hand.
  • Use Screen Editor when the layout itself needs design work.

Recommended GenPy docs:

Built for GenPy creators.