Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · AG.1X1 flag SVG

svgconstant

The flag of Antigua & Barbuda (アンティグア・バーブーダ), AG, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 694 B. The drawing flag("AG", { shape: "1:1" }) uses (and the round frame, in a circle), made for that shape by hand rather than cut from the flag. The /manifest entry's framings say how each frame was chosen.

Import it

import { svg } from "@johnmorrisdotca/hata/flags/ag.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><defs><clipPath id=\"hata-ag-1x1-a\"><path fill=\"#25ff01\" d=\"M109 47.6h464.8v464.9H109z\"/></clipPath></defs><g fill-rule=\"evenodd\" clip-path=\"url(#hata-ag-1x1-a)\" transform=\"translate(-120 -52.4)scale(1.1014)\"><path fill=\"#fff\" d=\"M0 47.6h693V512H0z\"/><path fill=\"#000001\" d=\"M109 47.6h464.8v186.1H109z\"/><path fill=\"#0072c6\" d=\"M128.3 232.1h435.8v103.5H128.3z\"/><path fill=\"#ce1126\" d=\"M692.5 49.2v463.3H347zm-691.3 0v463.3h345.7z\"/><path fill=\"#fcd116\" d=\"m508.8 232.2-69.3-17.6 59-44.4-72.5 10.3 37.3-63-64.1 37.2 11.3-73.5-43.4 58-17.6-67.3-19.6 69.3-43.4-59 12.4 75.6-64.1-39.3 37.2 63-70.3-11.3 57.9 43.4-72.4 18.6z\"/></g></svg>"

Examples

Example 1

import square from "@johnmorrisdotca/hata/flags/ag.1x1";

const host=document.createElement("div");
host.innerHTML = square;
console.log(host.querySelector("svg")?.getAttribute("viewBox"));

Example 2

import { svg } from "@johnmorrisdotca/hata/flags/ag.1x1";
console.log(svg.startsWith("<svg"),svg.length);
true 694

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.6.0.