I have sql query as below, i need to convert sql to codeigniter active record.

```
select * from color c 
    left join (select pc.* from product_color pc
        LEFT join product p on pc.product_id=p.product_id
        WHERE p.product_id=1)x on c.id=x.color_id

```