A bag of skittles contains green and purple candies in the ratio of 3 green to 4 purple. If there are 24 purple candies in the bag, how many are green?