Skip to content

AdamJCavanaugh/flagify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flagify

A browser-based tool to transform words into color flags. Choose your encoding style, preview instantly. Export as desired.

Background

I was inspired to create this when I ran across the idea of illegal numbers. It seems fairly simple to translate any typed characters into hexadecimal to an HTML color and I thought people might have fun creating flags or banners for family or business names.

Usage

Input any text and click Generate Banner to get an HTML banner!

Options

Dark mode

There is a light/dark mode toggle in the upper right.

Debug options

These options are hidden by default and can be expanded for more control over how text is encoded into colors.

Case Handling

Uppercase and lowercase letters have different ASCII values, which produce different hexadecimal values and therefore different colors. By default, Flagify preserves the original case, but you may force all characters to lowercase or uppercase.

Skip punctuation

When enabled, all non‑alphabetic characters are removed before encoding. When disabled, punctuation, numbers, and symbols are included and converted normally (each character still has an ASCII → hex → color mapping).

Group size

Characters are grouped before being converted into colors. Each character becomes a 2‑digit hexadecimal value, so:

  • Group size 2 → 4 hex digits → valid CSS shorthand RGBA
  • Group size 3 → 6 hex digits → standard HTML color (#RRGGBB)
  • Group size 4 → 8 hex digits → full RGBA (#RRGGBBAA)

The default group size is 3, which produces traditional 6‑digit HTML colors.

Padding character

If the final group is not long enough, it is padded on the right until it reaches the selected group size.

Example (group size 3): "gh""gh0"

The padding character is treated like any other character: it is converted to ASCII, then to hexadecimal, and included in the final color. Because of this, any character is valid as padding - not just hexadecimal digits.

Gradient mode

When enabled, the banner is rendered as a smooth linear gradient blending all generated colors from left to right. When disabled (default), each color is shown as a solid vertical stripe.

Export options

Flagify can export the generated banner in multiple formats and aspect ratios.

Formats

  • PNG - raster image, good for sharing or printing
  • SVG - vector image, infinitely scalable and ideal for flags

Aspect ratios

Common flag ratios are supported:

  • 2:3 (default) - e.g., France, Italy, India
  • 1:2 - e.g., UK, Canada - USA is 10:19, but 1:2 is commonly used
  • 1:1 - e.g., Switzerland

Each exported image is sized so the shorter side is approximately 400–500px for clarity:

  • 2:3 → 400×600
  • 1:2 → 350×700
  • 1:1 → 500×500

AI Notice

100% vibe coding.

About

A browser-based tool to transform words into color flags. Choose your encoding style, preview instantly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors