#!/bin/bash

SECTION=`echo $1| sed 's|::.*||'`
PARAMETER=`echo $1| sed 's|.*::||'`
VALUE=

SECTION_FOUND=
while read LINE
do
    if [ -z "$SECTION_FOUND" ] ; then
	if [ "$LINE" == "[$SECTION]" ]; then
	    SECTION_FOUND=1
	else
	    continue
	fi
    fi
    if echo "$LINE" | grep -q "^${PARAMETER}=" ; then
	VALUE=`echo "$LINE" | sed 's|.*=||'`
	break
    fi
done < graphics/kde4/kdm-color-scheme.colors

echo "$VALUE"| tr , ' '| xargs printf "%0.2x%0.2x%0.2x\n"
