proc colortorgb
	filen	clrutils.icn
	local	0,001000,color
	local	1,000020,rgb
	local	2,000000,RGB
	local	3,000000,tab
	local	4,000000,upto
	local	5,000000,move
	con	0,020000,1,054
	con	1,002000,1,1
	con	2,002000,1,0
	declend
	line	24
	colm	11
	mark	L1
	pnull
	var	1
	var	2
	line	27
	colm	14
	invoke	0
	line	27
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	var	0
	line	29
	colm	10
	bscan
	mark	L3
	pnull
	pnull
	var	1
	line	30
	colm	10
	field	r
	mark	L4
	var	3
	var	4
	cset	0
	line	30
	colm	24
	invoke	1
	line	30
	colm	19
	invoke	1
	esusp
	goto	L5
lab L4
	line	30
	colm	33
	pfail
lab L5
	line	30
	colm	13
	asgn
	unmark
lab L3
	mark	L6
	var	5
	int	1
	line	31
	colm	11
	invoke	1
	unmark
lab L6
	mark	L7
	pnull
	pnull
	var	1
	line	32
	colm	10
	field	g
	mark	L8
	var	3
	var	4
	cset	0
	line	32
	colm	24
	invoke	1
	line	32
	colm	19
	invoke	1
	esusp
	goto	L9
lab L8
	line	32
	colm	33
	pfail
lab L9
	line	32
	colm	13
	asgn
	unmark
lab L7
	mark	L10
	var	5
	int	1
	line	33
	colm	11
	invoke	1
	unmark
lab L10
	pnull
	pnull
	var	1
	line	34
	colm	10
	field	b
	var	3
	int	2
	line	34
	colm	19
	invoke	1
	line	34
	colm	13
	asgn
	line	29
	colm	10
	escan
	unmark
lab L2
	mark	L11
	mark	L12
	var	1
	line	37
	colm	4
	pret
lab L12
	pfail
	unmark
lab L11
	pnull
	line	39
	colm	1
	pfail
	end
proc rgbtocolor
	local	0,001000,rgb
	con	0,010000,1,054
	declend
	line	41
	colm	11
	mark	L1
	mark	L2
	pnull
	pnull
	pnull
	pnull
	pnull
	var	0
	line	43
	colm	14
	field	r
	str	0
	line	43
	colm	17
	cat
	pnull
	var	0
	line	43
	colm	30
	field	g
	line	43
	colm	24
	cat
	str	0
	line	43
	colm	33
	cat
	pnull
	var	0
	line	43
	colm	46
	field	b
	line	43
	colm	40
	cat
	line	43
	colm	4
	pret
lab L2
	pfail
	unmark
lab L1
	pnull
	line	45
	colm	1
	pfail
	end
