<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="negatecolorbox" file="colo-ext.mkiv">
        <cd:arguments>
            <cd:resolve name="string-box"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="colorintent" type="environment" file="colo-ext.mkiv">
        <cd:arguments>
            <cd:keywords>
                <cd:constant type="knockout"/>
                <cd:constant type="overprint"/>
                <cd:constant type="none"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="overprint" type="environment" file="colo-ext.mkiv"/>

    <cd:command name="knockout" type="environment" file="colo-ext.mkiv"/>

    <cd:command name="textcolorintent" type="environment" file="colo-ext.mkiv"/>

    <cd:command name="definecolorgroup" file="colo-grp.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords optional="yes">
                <cd:constant type="gray"/>
                <cd:constant type="rgb" default="yes"/>
                <cd:constant type="cmyk"/>
                <cd:constant type="spot"/>
            </cd:keywords>
            <cd:triplet list="yes"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definecolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:parameter name="r">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="g">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="b">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="c">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="m">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="y">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="k">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="h">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="s">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="v">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="x">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="a">
                    <cd:resolve name="value-transparency"/>
                </cd:parameter>
                <cd:parameter name="t">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definecolor" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineglobalcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineglobalcolor" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definenamedcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definenamedcolor" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="defineprocesscolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-color-optional"/>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definespotcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-color"/>
            <cd:assignments list="yes">
                <cd:parameter name="a">
                    <cd:resolve name="value-transparency"/>
                </cd:parameter>
                <cd:parameter name="t">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="e">
                    <cd:constant type="cd:text"/>
                </cd:parameter>
                <cd:parameter name="p">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definemultitonecolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:parameter name="cd:color">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="definespotcolor"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definetransparency" variant="1" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-number"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="definetransparency" variant="2" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:parameter name="a">
                    <cd:resolve name="value-transparency"/>
                </cd:parameter>
                <cd:parameter name="t">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definetransparency" variant="3" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="switchtocolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="color" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="coloronly" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="transparent" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="graycolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="colored" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="colored" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
            <cd:content/>
        </cd:arguments>
    </cd:command>

    <cd:command name="color" type="environment" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="coloronly" type="environment" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="transparent" type="environment" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="directcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="directcolored" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="directcolored" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:inherit name="definecolor"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="currentcolor" type="environment" file="colo-ini.mkiv"/>

    <cd:command name="colorset" type="environment" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="usecolors" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-file"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-file"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupcolors" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:assignments list="yes">
                <cd:parameter name="state">
                    <cd:constant type="start" default="yes"/>
                    <cd:constant type="stop"/>
                </cd:parameter>
                <cd:parameter name="spot">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="expansion">
                    <cd:constant type="yes"/>
                    <cd:constant type="no" default="yes"/>
                </cd:parameter>
                <cd:parameter name="factor">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="rgb">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="cmyk">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                </cd:parameter>
                <cd:parameter name="conversion">
                    <cd:constant type="yes" default="yes"/>
                    <cd:constant type="no"/>
                    <cd:constant type="always"/>
                </cd:parameter>
                <cd:parameter name="pagecolormodel">
                    <cd:constant type="auto"/>
                    <cd:constant type="none" default="yes"/>
                    <cd:constant type="cd:name"/>
                </cd:parameter>
                <cd:parameter name="textcolor">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
                <cd:parameter name="intent">
                    <cd:constant type="overprint"/>
                    <cd:constant type="knockout"/>
                    <cd:constant type="none" default="yes"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="color" type="environment" begin="push" end="pop" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="color" type="environment" begin="save" end="restore" file="colo-ini.mkiv"/>

    <cd:command name="definepalet" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:assignments list="yes">
                <cd:parameter name="cd:name">
                    <cd:constant type="cd:color"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="definepalet" variant="name" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getpaletsize" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="paletsize" file="colo-ini.mkiv"/>

    <cd:command name="setuppalet" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setcolormodell" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:keywords>
                <cd:constant type="black"/>
                <cd:constant type="bw"/>
                <cd:constant type="gray"/>
                <cd:constant type="rgb"/>
                <cd:constant type="cmyk"/>
                <cd:constant type="all" default="yes"/>
                <cd:constant type="none"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="protectedcolors" type="environment" file="colo-ini.mkiv"/>

    <cd:command name="defineintermediatecolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes">
                <cd:constant type="cd:color"/>
                <cd:constant type="cd:number"/>
            </cd:keywords>
            <cd:assignments list="yes" optional="yes">
                <cd:parameter name="a">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
                <cd:parameter name="t">
                    <cd:constant type="cd:number"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsecolor" file="color-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifcolorelse" file="color-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifcolor" file="color-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
            <cd:resolve name="argument-true"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="textcolor" type="environment" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="MPcolor" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="MPcoloronly" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="MPtransparency" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="MPoptions" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="colorvalue" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="grayvalue" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="colorcomponents" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="transparencycomponents" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="processcolorcomponents" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelseblack" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifblackelse" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-color"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsedrawingblack" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifdrawingblackelse" file="colo-ini.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showcolorbar" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showcolor" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showcolorset" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showcolorcomponents" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-color"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showpalet" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="horizontal" default="yes"/>
                <cd:constant type="vertical"/>
                <cd:constant type="number"/>
                <cd:constant type="value"/>
                <cd:constant type="name"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="comparepalet" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="showcolorgroup" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:keywords list="yes" optional="yes">
                <cd:constant type="horizontal" default="yes"/>
                <cd:constant type="vertical"/>
                <cd:constant type="number"/>
                <cd:constant type="value"/>
                <cd:constant type="name"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="comparecolorgroup" file="colo-run.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
        </cd:arguments>
    </cd:command>

</cd:interface>
