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

svgconstant

The flag of Hong Kong SAR China (中華人民共和国香港特別行政区), HK, drawn again by hand at 1:1 by flag-icons 7.5.0 (MIT), as an SVG string: viewBox 512 by 512, 655 B. The drawing flag("HK", { 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/hk.1x1";

Definition

const svg: string = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path fill=\"#ec1b2e\" d=\"M0 0h512v512H0\"/><path id=\"hata-hk-1x1-a\" fill=\"#fff\" d=\"M282.3 119.2C203 114 166.6 218 241.6 256.4 215.6 234 221 201 231.5 184l1.9 1c-13.8 23.6-11.2 52.8 11 71-12.6-12.2-9.4-39 12.2-48.8s23.6-39.3 16.4-49.1q-14.7-25.6 9.3-39zM243.9 180l-4.7 7.4-1.8-8.6-8.6-2.3 7.8-4.3-.6-9 6.5 6.2 8.3-3.3-3.7 8 5.6 6.9z\"/><use href=\"#hata-hk-1x1-a\" transform=\"rotate(72 248.5 259.5)\"/><use href=\"#hata-hk-1x1-a\" transform=\"rotate(144 248.5 259.5)\"/><use href=\"#hata-hk-1x1-a\" transform=\"rotate(216 248.5 259.5)\"/><use href=\"#hata-hk-1x1-a\" transform=\"rotate(288 248.5 259.5)\"/></svg>"

Examples

Example 1

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

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

Example 2

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

What it prints (run when this page was built)

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