package Color @ISA = qw() sub Spectrum return shift->{Spectrum}; sub ColorMatchingFunctionType return shift->{ColorMatchingFunctionType}; sub ColorMatchingFunction return shift->{ColorMatchingFunction}; sub LightSource return shift->{LightSource}; sub ColorMapImagePath return $ColormapGIF; sub GetDefinedxy my ($ColorMap) = @_; return ( (0.67, 0.3), (0.21, 0.71), (0.14, 0.08), (0.310, 0.316) ); return ( (0.640, 0.330), (0.300, 0.600), (0.150, 0.060), (0.3127, 0.3290) ); return ( (0.735, 0.265), (0.274, 0.717), (0.167, 0.0090), (-1, -1) ); return undef; sub XYZtoxyz my ($X, $Y, $Z) = @_; return ($X/$t, $Y/$t, $Z/$t); sub RGBtorgb my ($R, $G, $B) = @_; return ($R/$t, $G/$t, $B/$t); sub XYZtoRGB my ($X, $Y, $Z) = @_; return ($R, $G, $B); sub ImageCoordinatetoXYZMapping my ($x, $y) = @_; return ($vx, $vy); sub xyToImageCoordinate my ($vx, $vy) = @_; return ($x, $y); sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub CalculateColor my ($this) = @_; return ($X*$Y0, $Y*$Y0, $Z*$Y0); sub ReadSpectrum my ($this, $path, $Observation) = @_; return undef if(!defined $path or $path eq ''); return undef; return $this->{Spectrum} = $GraphArray; sub ReadLightSource my ($this, $LightSource, $T) = @_; return undef; return undef; return undef; return $this->{LightSource} = $GraphArray; sub ReadColorMatchingFunctions my ($this, $Type) = @_; return undef; return $this->{ColorMatchingFunction} = $GraphArray;