• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

twoLineLogoGenerator

Remix of dcm31/logoWorkshopOpenMoji
Public
Like
twoLineLogoGenerator
Home
Code
10
API_DOCS.md
ColorPicker.tsx
ColorUtils.tsx
EmojiUtils.tsx
FontData.tsx
LogoGenerator.tsx
LogoPreview.tsx
SvgHostClient.tsx
H
api.tsx
H
index.tsx
Branches
3
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
API_DOCS.md
Code
/
API_DOCS.md
Search
4/13/2025
Viewing readonly version of main branch: v18
View latest version
API_DOCS.md

Two-Line Logo Generator API

This API allows you to generate SVG logos with one or two lines of text, similar to the interactive logo generator. The API returns either the SVG content directly or as a data URL.

API Endpoint

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run

Query Parameters

ParameterDescriptionDefault
topWordTop text (or single line text)"LOGO"
bottomWordBottom text (only used in two-line mode)"TESTER"
fontFamilyFont name (must match a name from FontData.tsx)"Arial"
backgroundColorBackground color in hex (#RRGGBB)"#3B82F6"
textColorText color for top text in hex (#RRGGBB)"#FFFFFF"
accentColorColor for bottom text in hex (#RRGGBB)"#EA5A47"
secondaryColorColor for bottom strip in hex (#RRGGBB)"#781E32"
singleLineSet to "true" for single line modefalse
formatSet to "dataurl" to get a data URLSVG content

Available Fonts

The API supports the following font options:

  • Arial
  • Helvetica
  • Verdana
  • Tahoma
  • Trebuchet MS
  • Georgia
  • Garamond
  • Times New Roman
  • Courier New
  • Segoe UI
  • Calibri
  • Geneva
  • Optima
  • Cambria
  • Candara
  • Avenir
  • System UI

Examples

Basic Usage

Generate a two-line logo with default settings:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=HELLO&bottomWord=WORLD

Single Line Logo

Generate a single-line logo:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=MYLOGO&singleLine=true

Custom Colors and Font

Generate a logo with custom colors and font:

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=AWESOME&bottomWord=LOGO&fontFamily=Georgia&backgroundColor=%23FF5733&textColor=%23FFFFFF&accentColor=%23FFD700&secondaryColor=%23900C3F

Get Data URL

Get the logo as a data URL (returns JSON):

https://dcm31--052cd264181011f0abe4569c3dd06744.web.val.run?topWord=DATA&bottomWord=URL&format=dataurl

Response Formats

Default (SVG Content)

Returns the raw SVG content with MIME type image/svg+xml.

Data URL Format

Returns a JSON object with the following structure:

{ "success": true, "dataUrl": "data:image/svg+xml;base64,..." }

Notes

  • Text is automatically converted to uppercase
  • Font sizes are automatically calculated based on text length
  • The corner radius is fixed at 15px (same as the OpenMoji design)
  • The API uses CORS headers to allow cross-origin requests
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.