This is the last time I ask the question about Applescript - I see that this topic is unpopular since none of my questions has been answered. Probably I'm on the wrong way, but scripting for Illustrator seems to be very interesting and useful.
I found the way to set the color of a layer to RGB color -
set color of current layer in current document to {red:45.0, green:34.0, blue:34.0}
however, when I immediately execute this line of code -
set currentColor to color of current layer in current document
In the RESULTS window I get long numbers like these -
{class:RGB color info, red:45.000001117587, green:34.000001773238, blue:34.000001773238}
Thus, I cannot perform comparing operation between the colors.
Any suggestions about color formatting, rounding the numbers/totals to the way I can compare current color with desirable one.