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 · KM.1X1 flag SVG

defaultconstant

The flag of Comoros (コモロ), KM, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 964 B. The drawing flag("KM", { 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 value from "@johnmorrisdotca/hata/flags/km.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><defs><clipPath id=\"hata-km-1x1-a\"><path fill-opacity=\".7\" d=\"M0 0h416.3v416.3H0z\"/></clipPath></defs><g fill-rule=\"evenodd\" clip-path=\"url(#hata-km-1x1-a)\" transform=\"scale(1.23)\"><path fill=\"#ff0\" d=\"M0 0h625v104H0z\"/><path fill=\"#fff\" d=\"M0 104h625v104.1H0z\"/><path fill=\"#be0027\" d=\"M0 208.1h625v104H0z\"/><path fill=\"#3b5aa3\" d=\"M0 312.2h625v104H0z\"/><path fill=\"#239e46\" d=\"M0 0v416.2l310.4-207.5z\"/><path fill=\"#fff\" d=\"M127.8 115c-69.2-3.5-100.7 51.6-100.6 94.2-.2 50.4 47.6 92 91.7 89.4A100 100 0 0 1 65.8 209a98 98 0 0 1 62-94\"/><path fill=\"#fff\" d=\"m126.8 160.2-9.8-7.6-11.8 3.7 4.2-11.6-7.1-10.1 12.3.4 7.4-10 3.4 12 11.8 3.9-10.3 7zm-.2 42.3-9.8-7.6-11.8 3.7 4.2-11.6-7.2-10.1 12.4.4 7.4-10 3.4 12 11.8 4-10.3 6.9zm.2 42.8-9.8-7.6-11.8 3.7 4.2-11.7-7.1-10 12.3.4 7.4-10 3.4 12 11.8 3.9-10.3 6.9zm-.2 43.1-9.8-7.6-11.8 3.7 4.2-11.6-7.2-10.1 12.4.4 7.4-10 3.4 12 11.8 4-10.3 6.9z\"/></g></svg>"

Examples

Example 1

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

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

Example 2

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

What it prints (run when this page was built)

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