# Method Image.Color.Color()->`==()

Method `==

  `int res = Image.Color.Color() == other_color`
  `int res = Image.Color.Color() == rgb`
  `int res = Image.Color.Color() == greylevel`
  `int res = Image.Color.Color() == name`

Description

  Compares this object to another color, or color name. Example:

      object red=Image.Color.red;
      object other=Image.Color. ...;
      object black=Image.Color.black;

      if (red==other) ...
      if (red==({255,0,0})) ...
      if (black==0) ...
      if (red=="red") ...

Returns

  1 or 0

Note

  The other datatype (not color object) must be to the right!

See also

  rgb, grey, name