Items tagged with colortools

Feed

Of course, with Maple.

I want to plot some color points in CIE 1976 color space with SpatterPlot command exactly as showed on the help page. When I try:

restart:with(ColorTools):with(ImageTools):
barvy:=Color("Lab",[80.38,13.50,7.96]); 	
SpatterPlot(barvy,symbol="box");

I got the error:

Error, invalid input: ColorTools:-SpatterPlot expects its 1st argument, colors, to be of type list({ColorTools:-Color, name, string, list({float, nonnegint}), specfunc({COLOR, COLOUR})}), but received _m2194815429568

Where is the problem?
 

Hi everybody,

This is a notional example.
I create a variable MyColor of type string, which contains some correct specification of a known color.
Two examples are
    MyColor := "CSS Red";            
    MyColor := "Resene LaRioja":

In the ColorTools package there exist a few couples of (a priori) reciprocal functions, for instance NameToRGB24 and RGB24ToName.
So I can expect that composing one of this function with its reciprocal is a neutral operation.

But, if I apply first  NameToRGB24 to a well formed MyColor color and next thits reciprocal RGB24ToName , I do not recover MyColor ... or at least not all the time


Example 1 : 
with(ColorTools):
MyColor := "CSS Red";    
RGB24ToName ( NameToRGB24 (MyColor) ); 
     "Red"

Let us observe the loss of the palette name ...


Example 2 : 
MyColor := "Resene LaRioja";    
NameToRGB24 (MyColor) ); 
      [179, 193, 16]
RGB24ToName ( % ); 
     error, (in ColorTools) unknown RGB color [179, 193, 16]


It seems that RGB24ToName ( NameToRGB24 (MyColor) ); works correctly only if MyColor refers to a color from palette CSS. This seems consisttent with the loss of the palette name in example 1 and the presence of the word RGB (and not RGB24) in this error message.
More generally, for colors from other palettes than CSS the same kind of error is returned (I did not do intensive testing ...)

Is this an error,
   or some limitation I missed,
      or an improper use of RGB24ToName ?

I look forward to your response

 

 

 

When assigning a color to a given wave length I initially used ColorTools WavelengthToColor. Acer commented that this wasn't the most accurate. I looked into this a little further and it seems there could be a better result. The attached document compares some different ways of assigning colors to wave lengths. 

Warning- The CIEDE2000 computation for deltaE is very slow. I think this is because of the hue angle calculations which use piecewise a lot. The CIE94 delta E method produces nearly the same result and takes minutes instead of hours.

 

Questions;

 I think I could speed up my calculation if I could find the position of the minimum element of an Array similar to FindMinimalElement of a list. 

I created my own atan2 function (similar to Excel). If there were a built in Maple equivalent perhaps it would be faster? I didn't see any such function.

6bit_Wavelength_Color_CIEDE2000.mw

I was hoping to browse color results using a slider and text box. I see the "use DocumentTools" command, but was not able to get "use ColorTools" to allow execution of the "Color()" function. 

My slider "n" has the following code;

use DocumentTools in

Do(%outn=%n);
Do(%outrgb=my_rgb(%n));
use ColorTools in
Do(%outcolor=color_my_rgb(%n));
end use;
end use;

 Obtain the tri-stimulus XYZ values from the CIE Color matching functions.

 Show the gamut of maximum chroma for the standard observer model with a D65 Illuminant.

 Approximate the white point of a Planckian source and compare to D65.

 Translate the maximum chroma gamut in xy to Lab (CIE L*a*b*) for perceived gamut (Violet and Magenta come together)

 Map the RGB color cube of fully saturated color into Lab and compare to perceivable colors.

10/6/15  Initial Document

•12/28/15 Improve RGB gamut with more data points: Procedures added for RGB to Lab: Wavlength Colors now based on CIEDE2000 model for Lab.                   

 

 Here is the latest version of this document, the MSL_data must be in a directory set in the mw file;

MSL_data.xlsx    Vision_RGB_Gamut.mw

I would like to recolor a list of plots using Maple default values. I have produced a list of colors with the plots:-setcolors(default) command. However, the colors are returned as a list of Hex values.  I first converted the Hex values to RGB values and then attempted to adapt a procedure written by Joe Riel, named -recolor- (refer to Joe's answer from which this question is branched).

But I must have done something wrong.

The conversion from Hex to RGB...

Page 1 of 1