Skip to content

Support color directive for text color #144

@jongalloway

Description

@jongalloway

Summary

The Marpit color directive is not currently supported by MarpToPptx. In standard Marpit, color is a core directive alongside backgroundColor — both control slide appearance and are commonly used together for contrast (e.g., white text on a dark background).

Current behavior

  • backgroundColor is supported as a global, local, and spot directive.
  • color is silently ignored. Text always renders in the default color regardless of the directive value.

Expected behavior

color should be recognized in all three directive scopes (global front matter, local <!-- color: ... -->, and spot <!-- _color: ... -->), stored in SlideStyle, and applied as the default font color when rendering text shapes to PPTX.

Example

<!-- _backgroundColor: #0f3057 -->
<!-- _color: #FFFFFF -->

# White text on dark blue

Currently this renders dark text on dark blue, which is unreadable. The workaround is to avoid dark backgrounds entirely.

Reference

  • Marpit directives documentation lists color as a recognized local directive.
  • The MarpToPptx feature matrix in doc/marp-markdown.md lists supported directive keys but omits color.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions