<?php namespace \Color\BadFloatValueException;
class UnknownColorFormatException extends \Exception {

	public function __construct($value, $name = null) {

		# Get the error
		if($var > 1) {
			$error = 'greater then 1.0';
		} else if($var < 0) {
			$error = 'less then 0.0';
		}

		# Create text
		parent::__construct($name ? "Value for {$name} cannot be {$error}." : "Supplied value is {$error}.");
	}

}
