public function textToCode(array $details)
    {
        $formatted = array();

        if (isset($details['foreground'])) {
            $formatted['foreground'] = $this->color->getForeground($details['foreground']);
        }

        if (isset($details['background'])) {
            $formatted['background'] = $this->color->getBackground($details['background']);
        }

        return $formatted;
    }