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

defaultconstant

The flag of Greece (ギリシャ), GR, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 794 B. The drawing flag("GR", { 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/gr.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"#0d5eaf\" fill-rule=\"evenodd\" d=\"M0 0h512v57H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M0 57h512v57H0z\"/><path fill=\"#0d5eaf\" fill-rule=\"evenodd\" d=\"M0 114h512v57H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M0 171h512v57H0z\"/><path fill=\"#0d5eaf\" fill-rule=\"evenodd\" d=\"M0 228h512v56.9H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M0 284.9h512v57H0z\"/><path fill=\"#0d5eaf\" fill-rule=\"evenodd\" d=\"M0 341.9h512v57H0z\"/><path fill=\"#fff\" fill-rule=\"evenodd\" d=\"M0 398.9h512v57H0z\"/><path fill=\"#0d5eaf\" d=\"M0 0h284.9v284.9H0z\"/><g fill=\"#fff\" fill-rule=\"evenodd\" stroke-width=\"1.3\"><path d=\"M114 0h57v284.9h-57z\"/><path d=\"M0 114h284.9v57H0z\"/></g><path fill=\"#0d5eaf\" fill-rule=\"evenodd\" d=\"M0 455h512v57H0z\"/></svg>"

Examples

Example 1

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

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

Example 2

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

What it prints (run when this page was built)

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