Skip to main content
This guide shows you how to create videos with completely custom subtitle styles defined directly in your API request. Instead of using saved presets, you can specify all styling properties inline for maximum flexibility.

What You’ll Learn

Inline Styles

Define custom styles directly in API requests

Full Control

Customize fonts, colors, positions, and effects

No Presets Needed

Style without saving configurations

Animation Options

Add entry and exit animations

Before You Begin

Make sure you have:
  • A Pictory API key
  • Node.js or Python installed on your machine
  • Basic understanding of colors (RGBA format)
  • Familiarity with subtitle positioning

How Custom Subtitle Styling Works

When you define subtitle styles inline:
  1. Style Definition - You specify all subtitle properties in your request
  2. Property Application - Font, colors, position, and effects are configured
  3. Animation Setup - Entry and exit animations are applied (optional)
  4. No Saving Required - Style exists only for this video (not saved to account)
  5. Video Rendering - Subtitles render with your exact specifications
Inline subtitle styles give you complete control without creating saved presets. This is perfect for one-time custom styling or testing different subtitle configurations.

Complete Example

Subtitle Style Parameters

Font Properties

Color Properties

All colors use RGBA format: rgba(R, G, B, A) where R/G/B are 0-255 and A is 0-1

Position and Layout

Text Styling

Animation Options

You can add up to 2 animations per subtitle style (one entry, one exit).

Available Animations

Animation Configuration

RGBA Color Format

Common Colors

Use online RGBA color pickers to easily create color values for your custom styles.

Common Use Cases

Professional Business Subtitles

Result: Clean, professional subtitles with strong readability.

Social Media Style

Result: Eye-catching subtitles perfect for TikTok, Instagram Reels.

Educational Content

Result: High-contrast, easy-to-read subtitles for learning materials.

Animated Dynamic Subtitles

Result: Engaging subtitles with typewriter entry and fade exit.

Best Practices

Select fonts and sizes for optimal readability:
  • Font Size: 36-56 pixels for most videos (1920x1080)
  • Font Families: Use web-safe fonts like Poppins, Roboto, Arial, Montserrat
  • Font Weight: Bold is generally more readable on video
  • Custom Fonts: Test custom fonts thoroughly before production
  • Consistency: Use same font family across all scenes for cohesion
Ensure subtitles are easily visible:
  • Light Text on Dark: White text on semi-transparent black (most common)
  • Dark Text on Light: Black text on white background (high brightness videos)
  • Shadow for Depth: Add shadows to text without backgrounds
  • Keyword Colors: Use contrasting colors for keyword highlights
  • Test Backgrounds: Verify readability on various scene backgrounds
Place subtitles where they are visible but not intrusive:
  • Bottom-Center: Standard position, does not cover main content
  • Avoid Top: Unless content is primarily at bottom
  • Width: 70-90% paragraph width prevents text from reaching edges
  • Alignment: Center alignment works best for most content
  • Scene-Specific: Consider different positions for different scene types
Use animations to enhance, not distract:
  • Entry Animation: Fade or drift work well for most content
  • Exit Animation: Faster exit (fade) than entry feels natural
  • Speed: Medium or fast speeds prevent slow pacing
  • Avoid Overuse: Too many animations can be distracting
  • Match Content: Playful animations for casual, simple for professional
Always preview your custom styles:
  • Create Test Video: Use short sample text first
  • Multiple Scenes: Test with different background colors
  • Device Testing: View on mobile and desktop
  • Readability Check: Ensure text is clear at different video sizes
  • Adjust Iteratively: Refine style based on test results

Troubleshooting

Problem: Text is not clearly visible in the video.Solution:
  • Increase background opacity (higher alpha value in backgroundColor)
  • Use higher contrast between text color and background
  • Add or increase shadow (shadowColor and shadowWidth)
  • Increase font size (try 48-56 pixels)
  • Use bold decoration for thicker, more visible text
Problem: Subtitle colors appear different than intended.Solution:
  • Verify RGBA format is correct (rgba(R, G, B, A))
  • Check RGB values are 0-255, alpha is 0-1
  • Ensure proper comma separation in RGBA values
  • Test colors with online RGBA picker before using
  • Remember alpha channel affects transparency
  • Check for typos in color values
Problem: Specified font is not being used.Solution:
  • Use standard web fonts (Poppins, Roboto, Arial, Montserrat)
  • Check font name spelling exactly
  • If using custom font URL, verify URL is accessible
  • Ensure fontUrl points directly to font file (.woff2, .woff, .ttf)
  • Test with standard font first, then add custom
Problem: Entry or exit animations do not appear.Solution:
  • Verify animation name is from available options
  • Check type is either “entry” or “exit”
  • Ensure speed is “slow”, “medium”, “fast”, or “custom”
  • Maximum 2 animations allowed (one entry, one exit)
  • Check animations array syntax is correct
  • Try simple “fade” animation first to test
Problem: Subtitles appear in wrong location on screen.Solution:
  • Verify position value matches available options
  • Position names are case-sensitive and hyphenated
  • Check for typos: “bottom-center” not “bottom center”
  • Ensure paragraphWidth does not push text off-screen
  • Test with “bottom-center” first as baseline
  • Review final video to verify placement

Next Steps

Explore more subtitle and branding options:

Subtitle Styles

Use saved subtitle style presets

Highlight Keywords

Automatically emphasize important words

Brand Settings

Apply complete brand presets to videos

Custom Captions

Add multilingual captions to videos

API Reference

For complete technical details, see: