0 Replies - 258 Views - Last Post: 14 December 2013 - 12:56 AM Rate Topic: -----

#1 lifeinbinary  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 158
  • Joined: 15-February 11

Get color from CCSprite not working as expected

Posted 14 December 2013 - 12:56 AM

Hi, I'm trying to get the color (b component) of a CCSprite. I've put a CCSprite behind my background and it has unique colors so that I can use it to find out if I am clicking a certain element on the screen (I think this is called color mapping). When I use:
NSLog(@"%d",[[self.colorMap color] b]);


It always returns 255 (when I know it is not... the b component is very low [0-50] range. It returns 255 on all color channels no matter what color I put. What could be going on? I am using texture packer to pack my sprites... could that be it?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1