Create stunning ASCII art logos with beautiful gradient colors in your terminal! Perfect for project banners, startup logos, or just making your terminal look awesome.
You can also create stunning animations like these by using it as a library in your programs!
The logos produced by oh-my-logo
are CC0 (public domain); feel free to use them anywhere.
- 🎨 Two Rendering Modes: Choose between outlined ASCII art or filled block characters
- 🌈 13 Beautiful Palettes: From sunset gradients to matrix green
- 📐 Gradient Directions: Vertical, horizontal, and diagonal gradients
- 🔤 Multi-line Support: Create logos with multiple lines of text
- ⚡ Zero Dependencies: Run instantly with
npx
- no installation required - 🎛️ Customizable: Use different fonts and create your own color schemes
No installation needed! Try it right now:
npx oh-my-logo "HELLO WORLD"
Want filled characters? Add the --filled
flag:
npx oh-my-logo "YOUR LOGO" sunset --filled
npm install -g oh-my-logo
npx oh-my-logo "Your Text"
npm install oh-my-logo
oh-my-logo <text> [palette] [options]
import { render, renderFilled, PALETTES, getPaletteNames } from 'oh-my-logo';
// Basic ASCII art rendering
const logo = await render('HELLO WORLD', {
palette: 'sunset',
direction: 'horizontal'
});
console.log(logo);
// Using custom colors
const customLogo = await render('MY BRAND', {
palette: ['#ff0000', '#00ff00', '#0000ff'],
font: 'Big',
direction: 'diagonal'
});
console.log(customLogo);
// Filled block characters
await renderFilled('AWESOME', {
palette: 'fire'
});
// TypeScript usage
import { render, RenderOptions, PaletteName } from 'oh-my-logo';
const options: RenderOptions = {
palette: 'ocean' as PaletteName,
direction: 'vertical',
font: 'Standard'
};
const typedLogo = await render('TYPESCRIPT', options);
console.log(typedLogo);
// Access palette information
console.log('Available palettes:', getPaletteNames());
console.log('Sunset colors:', PALETTES.sunset);
<text>
: Text to display- Use
"\n"
for newlines:"LINE1\nLINE2"
- Use
"-"
to read from stdin
- Use
[palette]
: Color palette name (default:grad-blue
)
Option | Description | Default |
---|---|---|
-f, --font <name> |
Figlet font name | Standard |
-d, --direction <dir> |
Gradient direction (vertical , horizontal , diagonal ) |
vertical |
--filled |
Use filled block characters instead of outlined ASCII | false |
-l, --list-palettes |
Show all available color palettes | - |
--gallery |
Render text in all available palettes | - |
--color |
Force color output (useful for pipes) | - |
--no-color |
Disable color output | - |
-v, --version |
Show version number | - |
-h, --help |
Show help information | - |
View all palettes with preview colors:
npx oh-my-logo "" --list-palettes
Palette | Colors | Description |
---|---|---|
grad-blue |
#4ea8ff → #7f88ff |
Blue gradient (default) |
sunset |
#ff9966 → #ff5e62 → #ffa34e |
Warm sunset colors |
dawn |
#00c6ff → #0072ff |
Cool morning blues |
nebula |
#654ea3 → #eaafc8 |
Purple space nebula |
ocean |
#667eea → #764ba2 |
Deep ocean blues |
fire |
#ff0844 → #ffb199 |
Intense fire colors |
forest |
#134e5e → #71b280 |
Natural green tones |
gold |
#f7971e → #ffd200 |
Luxurious gold gradient |
purple |
#667db6 → #0082c8 → #0078ff |
Royal purple to blue |
mint |
#00d2ff → #3a7bd5 |
Fresh mint colors |
coral |
#ff9a9e → #fecfef |
Soft coral pink |
matrix |
#00ff41 → #008f11 |
Classic matrix green |
mono |
#f07178 → #f07178 |
Single coral color |
# Simple logo with default blue gradient
npx oh-my-logo "STARTUP"
# Multi-line company logo
npx oh-my-logo "MY\nCOMPANY" sunset
# Matrix-style hacker text
npx oh-my-logo "HACK THE PLANET" matrix --filled
# Outlined ASCII art (default)
npx oh-my-logo "CODE" fire
# Filled block characters
npx oh-my-logo "CODE" fire --filled
# Vertical gradient (default)
npx oh-my-logo "LOGO" ocean
# Horizontal gradient
npx oh-my-logo "LOGO" ocean -d horizontal
# Diagonal gradient
npx oh-my-logo "LOGO" ocean -d diagonal
# List available fonts (depends on your figlet installation)
figlet -f
# Use a different font
npx oh-my-logo "RETRO" purple -f "Big"
# Read from stdin
echo "DYNAMIC LOGO" | npx oh-my-logo - gold --filled
# Force colors in scripts
npx oh-my-logo "DEPLOY SUCCESS" forest --color
# Plain text output
npx oh-my-logo "LOG ENTRY" --no-color
# Display text in all available palettes
npx oh-my-logo "PREVIEW" --gallery
# Gallery with filled characters
npx oh-my-logo "COLORS" --gallery --filled
# Compare multi-line text across all palettes
npx oh-my-logo "MY\nLOGO" --gallery
# Gallery with custom font
npx oh-my-logo "STYLES" --gallery -f Big
- Project Banners: Add eye-catching headers to your README files
- Terminal Startup: Display your company logo when opening terminals
- CI/CD Pipelines: Make deployment logs more visually appealing
- Development Tools: Brand your CLI applications
- Presentations: Create stunning terminal demos
- Personal Branding: Add flair to your shell prompt or scripts
Variable | Description | Example |
---|---|---|
OHMYLOGO_FONT |
Default figlet font | export OHMYLOGO_FONT="Big" |
Renders ASCII art with gradient colors.
async function render(text: string, options?: RenderOptions): Promise<string>
- text (string): Text to display
- options.palette (PaletteName | string[]): Color palette name or custom colors
- options.font (string): Figlet font name (default: 'Standard')
- options.direction ('vertical' | 'horizontal' | 'diagonal'): Gradient direction
Returns: Promise<string>
- The colored ASCII art
Renders filled block characters with gradient.
async function renderFilled(text: string, options?: RenderInkOptions): Promise<void>
- text (string): Text to display
- options.palette (PaletteName | string[]): Color palette name or custom colors
Returns: Promise<void>
- Renders directly to stdout
PALETTES
: Object containing all built-in color palettesresolvePalette(name)
: Get palette colors by namegetPaletteNames()
: Get array of all palette namesgetDefaultPalette()
: Get the default palette colorsgetPalettePreview(name)
: Get a preview string of palette colors
type PaletteName = 'grad-blue' | 'sunset' | 'dawn' | 'nebula' | 'ocean' |
'fire' | 'forest' | 'gold' | 'purple' | 'mint' |
'coral' | 'matrix' | 'mono';
interface RenderOptions {
palette?: PaletteName | string[];
font?: string;
direction?: 'vertical' | 'horizontal' | 'diagonal';
}
interface RenderInkOptions {
palette?: PaletteName | string[];
}
Want to contribute or customize?
git clone https://github.com/yourusername/oh-my-logo.git
cd oh-my-logo
npm install
# Development mode
npm run dev -- "TEST" sunset --filled
# Build
npm run build
# Test the built version
node dist/index.js "HELLO" matrix --filled
Run the test suite with Vitest:
# Run all tests in watch mode
npm run test
# Run tests once (CI mode)
npm run test:coverage
# Run tests with UI
npm run test:ui
# Run specific test file
npm test -- src/__tests__/cli.test.ts
The test suite includes:
- Unit tests for all library functions
- CLI integration tests
- Color palette validation
- Error handling scenarios
- TTY/color detection logic
Tests are located in src/__tests__/
with the following structure:
cli.test.ts
- CLI command line behaviorlib.test.ts
- Library API functionspalettes.test.ts
- Color palette systemrenderer.test.ts
- ASCII art renderingutils/
- Utility function tests
Edit src/palettes.ts
to add your own color combinations:
export const PALETTES = {
// ... existing palettes
'my-palette': ['#ff0000', '#00ff00', '#0000ff'],
} as const;
Contributions are welcome! Please feel free to submit a Pull Request. Whether it's:
- 🎨 New color palettes
- 🔧 Bug fixes
- ✨ New features
- 📖 Documentation improvements
MIT AND CC0-1.0
Made with ❤️ for the terminal lovers
Transform your boring text into stunning visual logos!