@semy = 0.25
@third = @[1/3]
@fifth = @[1/5]
@sixth = @[1/6]

@canton_scale_cross_x = @[ ( 333 / 768 ) + 0.001 ]
@canton_scale_cross_y = @[ ( 205 / 512 ) + 0.001 ]

@canton_scale_sweden_x = @[ ( 255 / 768 ) + 0.001 ]
@canton_scale_sweden_y = @[ ( 204 / 512 ) + 0.001 ]

@uru_canton_height = 0.556
@NZL_coa_offset = @[3/16] 
@sm_fra = 0.16

QAJ = { 
pattern = "pattern_solid.tga"
	color1 = "blue_light"
	color2 = "blue_light"
	
	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 0.60 0.60 } position = { 0.51 0.42 } }			
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "blue_light"
		color2 = "blue_light"
		instance = { scale = { 0.4 0.2 } position = { 0.50 0.65 } }		
	}	
	colored_emblem = {		
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.16 0.16 } position = { 0.51 0.42 } }		
	}
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "yellow_dark"
		color2 = "yellow_dark"
		instance = { scale = { 0.5 0.02 } position = { 0.525 0.81 } }		
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.49 0.01 } position = { 0.525 0.805 } }		
	}	
	colored_emblem = {
		texture = "ce_lion_persia.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 1.1 1.1 } position = { 0.50 0.50 } }			
	}
}

QAJ_shahenshah = { 
pattern = "pattern_solid.tga"
	color1 = "blue"
	color2 = "blue"
	
	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 0.60 0.60 } position = { 0.51 0.42 } }			
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 0.4 0.2 } position = { 0.50 0.65 } }		
	}	
	colored_emblem = {		
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.16 0.16 } position = { 0.51 0.42 } }		
	}
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "yellow_dark"
		color2 = "yellow_dark"
		instance = { scale = { 0.5 0.02 } position = { 0.525 0.81 } }		
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.49 0.01 } position = { 0.525 0.805 } }		
	}	
	colored_emblem = {
		texture = "ce_lion_persia.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 1.1 1.1 } position = { 0.50 0.50 } }			
	}
}

PER_republic = {
	pattern = "pattern_solid.tga"
	color1 = "iran_green"
	color2 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "red"
	}	
	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 0.30 0.30 } position = { 0.51 0.465 } }			
	}	

	colored_emblem = {		
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.08 0.08 } position = { 0.51 0.465 } }		
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.25 0.10 } position = { 0.5 0.6 } }		
	}	
	colored_emblem = {		
		texture = "ce_solid.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.26 0.02 } position = { 0.51 0.66 } }		
	}	
	colored_emblem = {
		texture = "ce_lion_persia.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 0.55 0.55 } position = { 0.5 0.505 } }			
	}		
}

PHO = {
	pattern = "pattern_solid.tga"
	color1 = "purple"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "purple"
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.1 0.14 }  }
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.19 0.1 }  }
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.16 0.23 }  }
	}
}

LYD = {
	pattern = "pattern_solid.tga"
	color1 = "yellow"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "pearl"
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.1 0.14 }  }
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.19 0.1 }  }
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.12 0.12 } position = { 0.16 0.23 }  }
	}
}

HER = { 
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "green"
	}
}

KAN = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "black_light"
}

KAB = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "black_light"
	
	colored_emblem = {
		texture = "ce_scimitar.dds"
		color1 = "white"
		instance = { scale = { 1.1 1.1 } position = { 0.5 0.5 } }	
	}
}

DUR = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "black_light"
	
	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.55 0.55 } position = { 0.5 0.5 } }
	}
	
	colored_emblem = {
		texture = "ce_scimitar.dds"
		color1 = "white"
		instance = { scale = { 1.1 1.1 } position = { 0.5 0.75 } }	
	}
}

MAI = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "uzbekistan_blue"
	
}

AFG = { # Afghanistan
	# 1901 design w/ stylized mosque - default monarchy
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "white"
	
	colored_emblem = {
		texture = "ce_coa_afghanistan.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.9 0.9 } position = { 0.5 0.5 } }			
	}
}

AFG_absolute_monarchy = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "black_light"
}
AFG_republic = {
	# 1930 flag
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "red"
	
	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "red"
		color2 = "green"

	}	
	colored_emblem = {
		texture = "ce_coa_afghanistan.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.55 0.55 } position = { 0.5 0.5 } }			
	}
}
AFG_dictatorship = {
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "red"
	
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 1.0 0.5 } position = { 0.5 0.25 } }			
	}	
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 1.0 0.25 } position = { 0.5 0.125 } }			
	}		
	colored_emblem = {
		texture = "ce_coa_afghanistan.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.6 0.6 } position = { 0.22 0.24 } }			
	}
}
AFG_theocracy = {
	# 1992 Islamic state, a bit simplified 
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "white"
	
	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "green"
	}		
	colored_emblem = {
		texture = "ce_shahada_02.dds"
		color1 = "blue"
		color2 = "blue"
		instance = { scale = { 0.8 0.9 } position = { 0.5 0.5 } }
	}	
}
AFG_subject = {
	
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "black"
	
	colored_emblem = {
		texture = "ce_coa_afghanistan.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.6 0.6 } position = { 0.75 0.5 } }			
	}
}
AFG_subject_GBR = {
	pattern = "pattern_solid.tga"
	color1 = "blue"
	
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.5 0.5 } position = { 0.75 0.5 } }		
	}	
	colored_emblem = {
		texture = "ce_coa_afghanistan.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.5 0.5 } position = { 0.75 0.5 } }			
	}
}

AFG_durrani = { 
	# Staring flag
	# Plain black flag of Kandahar
	
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "green"
	}
	
	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.38 0.38 } position = { 0.5 0.16 } }
	}
	
	colored_emblem = {
		texture = "ce_scimitar.dds"
		color1 = "white"
		instance = { scale = { 1.0 1.0 } position = { 0.5 0.80 } }	
		instance = { scale = { 1.0 1.0 } position = { 0.5 0.80 } }	
	}
}

AFG_uzbekistan = { 
	pattern = "pattern_solid.tga"
	color1 = "uzbekistan_blue"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "uzbekistan_green"
	}
	
	colored_emblem = {
		texture = "ce_crescent.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.25 0.35 } position = { 0.2 0.18 } }		
				
						
	}
	
	@usa_star_scale_25 = 0.1

	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		
		# 25 stars
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 1.5 ] @[ 1 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 1.8 ] @[ 1 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.1 ] @[ 1 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.4 ] @[ 1 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.7 ] @[ 1 / 7 * 2 ] } }
		
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 1.8 ] @[ .6 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.1 ] @[ .6 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.4 ] @[ .6 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.7 ] @[ .6 / 7 * 2 ] } }
		
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.1 ] @[ .2 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.4 ] @[ .2 / 7 * 2 ] } }
		instance = { scale = { @usa_star_scale_25 @usa_star_scale_25 } position = { @[ 1 / 5 * 2.7 ] @[ .2 / 7 * 2 ] } }
		
				
	}
}

PAK = { # Pakistan
	# Modern flag (azad hind) with dharmachakra (since 1947)
	
	pattern = "pattern_solid.tga"
	color1 = "orange"
	color2 = "white"
	color3 = "green"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "green"
	}
	colored_emblem = {
		texture = "ce_dharmachakra_india.dds"
		color1 = "blue"
		color2 = "blue"
		instance = { scale = { 0.4 0.4 } position = { 0.5 0.5 } }
	}
}
PAK_subject = {
	# 1879 design, blue ensign with order of the star badge 
	
	pattern = "pattern_solid.tga"
	color1 = "blue"
	color2 = "white"
	color3 = "red"
	
	textured_emblem = {
		texture = "te_star_india.dds"
		instance = { scale = { 0.6 0.6 } position = { 0.75 0.5 } }
	}	
}
PAK_communist = {
	# Communist Party of India rather uniquely uses a white version of the hammer and sickle emblem
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"
	
	colored_emblem = {
		texture = "ce_hammer_and_sickle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.45 0.45 } position = { 0.20 0.30 } } 
	}	
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.08 0.08 } position = { 0.17 0.12 } } 
	}	
}
PAK_fascist = {	
	# RSS flag
	pattern = "pattern_solid.tga"
	color1 = "saffron"	
}

MAR = { 
	pattern = "pattern_solid.tga"
	color1 = "orange"
}