Flag of Hungary in SVG
This is part of the SVG Tutorial and exercises drawing the Hungarian flag in SVG.
Accoridng to the Wikipedia and the Wikimedia svg, the Hungarian flag has a 2:1 ratio and the 3 stripes have the following RGB color values: The Red is #CD2A3E, the white is, well, it is white #FFFFFF, and the green is #436F4D.
examples/js/svg_flag_of_hungary.js
function flag_of_hungary() { var draw = SVG('flag_of_hungary'); var width = 120; var height = width/2; draw.size(width, height); var red = draw.rect(width, height/3).fill({ color: '#CD2A3E' }); var white = draw.rect(width, height/3).fill({ color: '#FFFFFF' }).dy(height/3); var green = draw.rect(width, height/3).fill({ color: '#436F4D' }).dy(2*height/3); } flag_of_hungary();
Published on 2015-02-14