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

defaultconstant

The flag of Namibia (ナミビア), NA, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 882 B. The drawing flag("NA", { 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/na.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><defs><clipPath id=\"hata-na-1x1-a\"><path fill-opacity=\".7\" d=\"M0 0h512v512H0z\"/></clipPath></defs><g fill-rule=\"evenodd\" clip-path=\"url(#hata-na-1x1-a)\"><path fill=\"#fff\" d=\"M0 0h512v512H0z\"/><path fill=\"#3662a2\" d=\"m-108.2.2.8 368.6L466.6 0z\"/><path fill=\"#38a100\" d=\"m630.7 511.5-1.4-383.2-579 383.5z\"/><path fill=\"#c70000\" d=\"m-107.9 396.6.5 115.4 125.3-.2 611.7-410.1L629 1.4 505.2.2z\"/><path fill=\"#ffe700\" d=\"m154 183.4-23.1-14-13.4 23.6-13-23.8L81 183l.6-27.1-27 .2 14-23.2L45 119.5l23.8-13L55 83l27 .6-.1-27.1 23.2 14 13.4-23.6 13 23.7L155.2 57l-.6 27 27-.1-14 23.2 23.6 13.3-23.8 13.1 13.7 23.4-27-.5z\"/><path fill=\"#3662a2\" d=\"M167.8 120c0 27.2-22.3 49.3-49.8 49.3s-49.7-22.1-49.7-49.4 22.3-49.3 49.8-49.3 49.7 22 49.7 49.3z\"/><path fill=\"#ffe700\" d=\"M157 120a39 39 0 1 1-77.9 0 39 39 0 0 1 77.9 0\"/></g></svg>"

Examples

Example 1

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

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

Example 2

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

What it prints (run when this page was built)

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