It's an array of object.I want to print only rgb value so that i can match it with other rgb value in if else statement. plz help.
Color { _rgb: [ 4, 4, 4, 1, _clipped: false ] }
You can make your constructor function like,
function MyColor(color) {
let rgb = color._rgb;
[this.r, this.g, this.b] = [rgb[0], rgb[1], rgb[2]];
}
console.log(new MyColor(color));// MyColor { r: 40, g: 55, b: 67 }