fault.format

Color formatting for URL strings.

ri
import

palette
data

palette = {
	'yellow': 0xffff87,
	'blue': 0x0087ff,
	'red': 0xff6961,
	'orange': 0xffb347,
}

colors
data

colors = {
	'delimiter': 0x6c6c6c,
	'scheme': palette['blue'],
	'type': 0x6c6c6c,

	'user': 0xff5f00,
	'password': 0x5f0000,

	'host': 0x875faf,
	'address': palette['orange'],
	'port': 0x005f5f,

	'path-root': -1024,
	'path-segment': 0x6e6e6e,
	'delimiter-path-only': 0x6e6e6e,
	'delimiter-path-initial': 0x6e6e6e,
	'delimiter-path-root': 0x6e6e6e,
	'delimiter-path-segments': 0x6e6e6e,
	'delimiter-path-final': 0x6e6e6e,
	'resource': 0xFFFFFF,

	'query-key': 0x5fafff,
	'query-value': 0x949494,
	'fragment': 0x505050,
	('delimiter', "#"): 0xFF0000,
}

f_struct
function

f_struct(struct)

f_string
function

f_string(string)

Format the string returning an iterable for use with matrix.Context.render