From masquerading to blending in: ontogenetic shifts in antipredator camouflage in Wallace’s flying frogs

A diversity of defence colourations that shift over time provides protection against natural enemies. Adaptations for camouflage depend on an organism’s interactions with the natural environment (predators, habitat), which can change ontogenetically. Wallace’s flying frogs (Rhacophorus nigropalmatus) are cryptic emerald green in their adult life stage, but juveniles are bright red and develop white spots on their back 1 month after metamorphosis. This latter conspicuous visual appearance might function as antipredator strategy, where frogs masquerade as bird or bat droppings so that predators misidentified them as inedible objects. To test this idea, we created different paraffin wax frog models—red with white spots, red without white spots, green, and unpainted—and placed them in equal numbers within a > 800 m2 rainforest house at the Vienna Zoo. This environment closely resembles the Bornean rainforest and includes several free-living avian predators of frogs. We observed an overall hit rate of 15.5%. A visual model showed that the contrast of red, green and control models against the background colouration could be discriminated by avian predators, whereas green models had less chromatic difference than red morphs. The attack rate was significantly greater for red but was reduced by half when red models had white spots. The data therefore supports the hypothesis that the juvenile colouration likely acts as a masquerade strategy, disguising frogs as animal droppings which provides similar protection as the cryptic green adult colour. We discuss the ontogenetic colour change as a possible antipredator strategy in relation to the different habitats used at different life stages. Predation pressure and the evolution of antipredator strategies site at the cornerstone of animal-behaviour research. Effective antipredator strategies can change in response to different habitats that animals use during different life stages. We study ontogenetic shifts in colour change as dynamic antipredator strategy in juvenile and adult Wallace’s flying frogs. We show that the unusual colour pattern of juveniles (bright red with small white spots) likely functions as a masquerade of animal droppings. Specifically, we show that white dotting, which can be associated with animal faeces, acts as the main visual feature that turns an otherwise highly conspicuous individual into a surprisingly camouflaged one. To our knowledge, this is the first experimental exploration of a vertebrate masquerading as animal droppings.


Introduction
Animal colour patterns are nothing less than spectacular, evolving in diverse ways across the tree of life.To better understand why such colouration arises in the first place, many look to the functions of animal colouration.Some species, for example, evolve unique combinations of colour that help individuals avoid being eaten by predators (Caro et al. 2016;Cuthill 2019;Postema et al. 2023).The process by which natural selection through predation drives the evolution of these colour traits can be a complex, in that it often involves a host of factors related to other (sometimes opposing) forces of selection (Cuthill et al. 2017;Postema et al. 2023).An important aspect in this regard is an animal's life cycle with different requirements depending on the animals age, size and/or habitat (Endler 1978(Endler , 1993)).Truly effective antipredator strategies may therefore also need to be adapted in light of changing factors during different life stages (Wilson et al. 2007).However, this phenomenon is infrequently studied, particularly in taxa that adopt extraordinary antipredator defence strategies related to colouration (Caro et al. 2016;Duarte et al. 2017;Caro and Koneru 2020).
Camouflage is one of the most common predator defence strategies in the animal kingdom.It refers to instances in which animals adopt morphological and/or behavioural traits that help individuals resemble part of the environment or background, especially when these individuals are most vulnerable to predation (Rojas et al. 2018;Stevens and Ruxton 2018).Most camouflage strategies involve forms of mimesis, or mimicking objects in the environment and altering movements to better appear as those objects.As such, cryptic animals avoid detection from predators by either generally resembling certain objects and/or by background matching a landscape composed of multiple objects (Endler 1981(Endler , 1984;;Cuthill 2019).For example, many animals have colours and patterns that help individuals look like dominant objects in their environment, or the substrate they use, such as leaves or moss (Toledo and Haddad 2009).This strategy works on the sensory level of the predator, hampering its ability to detect prey items (Skelhorn 2015).Alternatively, other animals have colour patterns that help them look like objects in the environment that are rarer to find, such as bird droppings, or isolated stones (Toledo and Haddad 2009).This form of camouflage is called a masquerade (Endler 1981;Allen and Cooper 1985;Skelhorn et al. 2010a), and sits in contrast to the above outlined background matching strategy, because an animal appears like an inanimate environmental object that is highly conspicuous.The key, however, is that this object is inedible to a predator (Skelhorn et al. 2010b;Skelhorn 2015).A masquerade therefore works at the cognitive level of the predator-in other words, while the predator clearly detects the prey item, it routinely misclassifies the prey as something it cannot (or should not) eat because the object is likely unpalatable or even harmful (Skelhorn 2015).Both camouflage strategies-background matching and masquerade-involve significant decreases in physical movement, with species often sitting perfectly still or move less to maintain the deception (Stevens and Ruxton 2018).
One of the main challenges for camouflage strategies used as predator defence is that they have to meet different colourmatching requirements to provide protection.For instance, certain colour patterns may only be effective antipredator strategies in particular habitats (Endler 1978;Merilaita et al. 2001) or against specific predators (Higginson and Ruxton 2009;Barnett et al. 2018), both of which can change as animals age, grow, and/or inhabit different environments (Endler 1978;Toledo and Haddad 2009).Evolutionarily, one solution to this challenge is that animals ontogenetically change their camouflage strategies (Booth 1990).Crab spiders (Phrynarachne ceylonica), for example, adopt a cryptic strategy when they are young, but then transition into a particular masquerade strategy-mimicking bird droppings-when they age, as the latter strategy is considered more effective for individuals with a larger body size (Yu et al. 2022a, b).Likewise, swallowtail larvae (Papilio sp.) switch from a bird-dropping masquerade to a cryptic green appearance with eyespots.In this case, it is hypothesized that body size is crucial for this transition (Postema 2022).To our knowledge, all experimentally tested examples come from invertebrate species (Valkonen et al. 2014;Gaitonde et al. 2018;Postema 2022;Yu et al. 2022a).
Here, we address this gap in the Wallace's flying frog, Rhacophorus nigropalmatus.Many Old World tree frogs (Rhacophoridae) change their colouration during ontogenesis, with juveniles typically displaying cryptic back patterns or stripes and adults possessing cryptic green colouration (Biju et al. 2013).In this case, even though there is a change in colouration, the general antipredator strategy to cryptically match the background is the same.By contrast, the body colouration of juvenile Wallace's flying frogs are bright red/orange, with conspicuous white spots that formed on the back during the first weeks after metamorphosis (Fig. 1A).These spots disappear after one year, when individuals mature into adults and develop their iconic emerald green colour (Fig. 1B) (Stückler et al. 2022).For juveniles, the striking colouration is suggested to resemble bird or bat droppings.Indeed, most taxa that mimic bird droppings have white spots, which facilitate imitation and possibly help change the appearance of the animal's body shape (Liu et al. 2014;Valkonen et al. 2014;Yu et al. 2022a, b).All reported species masquerading animal droppings have white spots in common, but to our knowledge studies testing white spots as a common feature to show unpalatability are scarce.
In the current study, we test whether white spots contribute to antipredator defence in frogs living in a rainforest environment.We hypothesize that such spots, which are present only during the conspicuous red juvenile stage, help frogs masquerade as unpalatable objects for predators.Accordingly, we predict that juvenile colour patterns provide camouflage against predators that is similarly effective as the cryptic green colour seen in adult flying frogs.We predict that the models painted in this manner will receive less attacks than the plain red models.Furthermore, because both conspicuous and cryptic camouflage colouration depend on the i) spectral environments of the mimic's habitats and ii) the visual capability of their predators (Endler and Théry 1996), we also investigated the potential predation risk of different colour signals under semi-natural conditions in the rainforest where we worked.In other words, we modelled how well potential predators could see the different colour morphs presented in our study.We conducted this work in the large rainforest house of the Vienna Zoo, which contains a diverse community of avian predators that are well known to use colour vision to detect frogs as prey (Jacobs 1981;Endler and Théry 1996;Jones et al. 2007).

Study animals and study site
Rhacophorus nigropalmatus is a relatively large tree frog (males 79-89 mm; females 89-100 mm) distributed in primary lowland rainforests of South East Asia (Inger 1966;Inger and Stuebing 2005).The size of juveniles at the age of 9-11 months ranges from 42 to 52 mm (SS, unpublished data).Adults have full toe webbings and skin flaps on arms and legs, which they use to glide through rainforests (Emerson and Koehl 1990).This species performs a drastic ontogenetic colour change from bright orange-red juveniles to adults with green dorsal colouration (Inger and Stuebing 2005).Additional white spots form on the frog's back 1 month after metamorphosis and reduce 10-13 months later when the frogs change to their adult green colouration (Stückler et al. 2022).Adults live high up in the canopy (Haas et al. 2022), whereas the juveniles' habitat is so far unknown.However, early life stages likely inhabit the forest understory, which is where foam nests are laid and tadpoles develop in forest pools and puddles (Ready 2009; DP personal observation).Literature about predators of R. nigropalmatus is limited, but birds are known predators of other Rhacophoridae species (e.g.R. pseudomalabaricus (Vasudevan and Dutta 2000) and Polypedates otilophus (O.Konopik personal observation).We also observed several bird species in the rainforest house attacking frogs (S.Cloer, MJF and DP personal observation).We conducted this study in the > 800 m 2 large rainforest house at the Vienna Zoo.This enclosure has three levels, with a large cascading waterfall.The rainforest house also contains over 15 bird species (> 150 individuals) endemic to the South-East Asian rainforest (see supplementary material) and that overlap with habitat that includes Wallace's flying frogs.Individuals in the avian community are able to freely move around in the rainforest house at all parts of the day.The rainforest house also inhabits several free ranging Southeast Asian frog species: Duttaphrynus melanostictus (Bufonidae), Ingerophrynus divergens (Bufonidae), Polypedates otilophus (Rhacophoridae), P. leucomystax (Rhacophoridae) and Staurois parvus (Ranidae).The diet of the birds consisted of daily feedings of fruits (apples, pears, oranges, kiwi, melon, berries, papaya, mango, figs, grapes etc.), animal products (curd, insects, boiled eggs) and vegetables (lettuce, carrot, cucumber, fennel, celery, paprika etc.).

Experimental design
We tested the idea that the frog's juvenile and adult colourations provide a sufficient antipredator strategy using wax models that were painted to resemble juvenile red colouration with or without spots, adult green colouration, and white (unpainted) controls.Birds in the rainforest house rarely have contact with pure white objects, especially in the area where wax models were placed.Overall, we produced 640 models of identical size (SVL 70 mm) and shape that looked like sleeping/resting flying frogs.These models had an intermediate size between juvenile and adult Wallace's tree frogs, and they were made with paraffin wax (Stafil, Bozen, Italy) casted in silicon moulds (webake, Essex, Great Britain).We painted each model (except for controls) with non-toxic, water-based acrylic colour paint (Daler-Rowney Ltd., Bracknell, United Kingdom), and we carefully mixed the acrylic colours to closely match the available spectral reflectance of juveniles and adult individuals (Stückler et al. 2022) (Figs. 1 and 2).Notably, few studies use spectral measurements of their colour models to verify that they match the right objects/animals (e.g.Postema ( 2022)); however, the work that does conduct such validation measurements appears to report a colour match between the model and animal that is similar to what we show herein (Dreher et al. 2015).

Data collection
Our experiment ran over the course of 8 days.At the beginning of each day (≈0700 h), we attached 80 models (20 models of each colour, see above) to leaves and branches throughout the rainforest house.On the lowest floor of the facility (which contains a 280 m 2 patch of forest), we placed 48 models (5.8 m 2 /model).On the middle floor (which contains a 227 m 2 patch of forest), we placed 32 models (7.1 m 2 /model).The different levels of the rainforest house did not influence the attack rates on the different models (LMM: lower level: ls mean = 0.151, SE = 0.055; upper level: ls mean = 0.16, SE = 0.056; p > 0.05); therefore, we did not include the levels in further analysis.During our experiment, both levels were closed off to zoo visitors, providing an interference-free study location.Importantly, we first assigned colour models to a given location at random, ensuring only that equal numbers of colour models were represented at a given location at the same time.We collected each model after 24 h in the rainforest house, and we replaced the model with another model of a different colour.In this way, all the different models used in our experiment were displayed in each location.Replacement models were fixed in a nearby location to avoid habituation effects (within 0.5 m of the previous model).
Once the models were collected for the day, we carefully inspected each one for evidence of an attack.If an attack was found, we photographed it and recorded the event as a predation attempt.Bird attacks were identifiable by marks in the wax (Fig. 3) and they were quite common in our experiment.We did not use blind methods but to minimize observer bias, attacks were verified independently by three people each day after collecting the models.Participants in the study routinely noticed birds attempting to attack models, pecking them vigorously on leaves and even the ground.To avoid classifying cockroach bites as predator attacks in our data collection, two wax models were placed for 24 h in a fauna box with different cockroaches (Periplaneta americana and P. australasiae).The insect marks had the appearance of scratches and could be clearly differentiated from bird attacks.

Colour measurements and visual model
To investigate differences in discriminability between different colour models and their background (leaves and branches) for potential predators, we quantified spectral reflectance of models, as well as background and calculated a colour vision model.Background and model colourations were measured with a spectrometer (JAZ series; Ocean Optics, Dunedin, FL, USA), according a standardized protocol (Sztatecsny et al. 2010;Stückler et al. 2022).We took five measurements of each colour morph model, 25 measurements of various leaves and 10 measurements of branches that were used as resting positions for models.Colour reflectance of models and background were extracted for 300-700 nm and expressed as percentage relative to a white standard (WS-1 Diffuse Reflectance Standard, Ocean Optics) with the programme Avicol (Gomez 2006).Attack marks on wax models suggested birds as potential predators of R. nigropalmatus in the rainforest house; thus, we examined the perceptual capability of birds to discriminate among red, green and white (control) models relative to the leaf or branch background.
Next, we used the programme R (package PAVO) to model a bird's visual system (Maia et al. 2019).As the receptor sensitivity of bird species inhabiting the rainforest house are unknown, we used the visual system of the Eurasian Blue Tit, Cyanistes caeruleus-available in PAVO.Note that past work suggests that resulting small error in the estimation of receptor sensitivities do not seriously affect model results (Lind and Kelber 2009;Bitton et al. 2017).For the analysis, we used the function 'vismodel' to calculate quantum catches of each photoreceptor for the visual system with the following arguments (Guidi et al. 2021): visual = bluetit, illum = forestshade, trans = bluetit, scale = 1, relative = false; the remaining arguments were set to the default setting.
To calculate chromatic discriminability between colouration differences, we used a well-established receptor-noise model that calculates colour differences or estimates of discriminability expressed as just-noticeable-differences (chromatic JND: JND (dS) ).These estimates are based on the relative photoreceptor densities, and thus account for receiver (predator) sensory capabilities (Vorobyev and Osorio 1998).JND values of 1 represent the threshold of predictably noticeable discriminability between two colour patches.JNDs higher than 1 provide increased distance in the colour space, and thus proportionally increased discernibility and discrimination (Igic et al. 2012;Chaves-Acuña et al. 2020).JND values < 1 indicate that two colours remain visually indistinguishable (Vorobyev et al. 2001;Siddiqi et al. 2004).We calculated JNDs with the function 'coldist' of the R package PAVO comparing the models' colouration against the background colouration with the following arguments (Guidi et al. 2021): subset = null, achromatic = false, n = 1, 1.9, 2.7, 2.7 (Hart et al. 2000), weber = 0.1, weber.ref= longest, weber.achro= false; the remaining arguments were set to default settings.

Data analysis
Statistical analyses were conducted in R (R Studio Team 2021).First, we classified each frog model as either "hit" or "not hit", with several predation attempts on one model were counted as one attack.Then, to test how rates of attack varied among the colour models, we compared hits or no-hits between colour morphs with Fisher´s exact test and a generalized linear model ('glm'), using a binomial error distribution and log-link function.We used 'lsmeans' package to further evaluate differences in attack rates between models, implementing least-square means pairwise comparisons alongside Tukey p-value adjustment for multiple comparisons (Lenth 2016).Hit or no-hit were entered as the dependent variable, whereas colour morphs were entered as the predictor variable.
To test the discriminability differences of the model morphs against the background, we performed a generalized linear mixed model (GLMM) on JNDs.Chromatic differences were entered as the dependent variables, colour morph as the predictor variable.Multiple measurements of models (red, green and control) and background (leaves and branches) were entered as random variables.For post-hoc tests, we used Student's t tests, with sequential Bonferroni correction for alpha.

Results
Avian predators detected and attacked the wax models resembling resting Wallace's flying frogs.Of the 640 models that we placed into the rainforest house, we found that 99 were attacked.This resulted in an overall attack rate of 15.5%, which is on par or higher than attack rates reported in studies that use a similar approach (Hegna et al. 2011;Preißler and Pröhl 2017).The higher attack rate compared to other frog model studies (Stuart et al. 2012;Lawrence et al. 2019) can be explained by predator density of the study site, with over 150 free ranging birds in an area of 800 m 2 .
Our analyses showed that the odds of attack differed significantly among the colour models (Fisher's exact test, p < 0.001; GLM: p < 0.01; Supplementary Table 1).Posthoc analyses revealed that red models received the highest attack rates, compared to all other colours (ls means: red vs. red-spotted: p = 0.001; red vs. green: p = 0.003, red vs. control: p < 0.001; Fig. 4A; Supplementary Table 2).Interestingly, there were no differences in the odds of attack between red models with white spots and emerald green models (ls means: red-spotted vs. green: p > 0.05).White control models received the lowest number of attacks compared to all other groups (ls means: control vs. red: p < 0.001; control vs. red-spotted: p = 0.026; control vs. green: p = 0.01; Fig. 4A; Supplementary Table 2, 3).

Discussion
Here, we show that the unusual colour pattern of juvenile Wallace's tree frogs-bright red with small white spotslikely functions as an antipredator strategy.Frog models painted in this manner are attacked significantly less often Fig. 4 Comparisons of A bird attacks on four different frog models (red, red-spotted, green and control) and B chromatic contrast (expressed as just-noticeable differences (JNDs)) of red (n = 5), green (n = 5) and white (control, n = 5) models against background (leaves: n = 25; branches: n = 10), as perceived by birds (spectral sensitivity of Eurasian Blue Tit, Cyanistes caeruleus).Boxplots show the median, the 25th to the 75th percentile, and the 5th and 95th percentiles.Asterisk indicate significant differences between models from GLM pairwise comparisons (*p < 0.05; **p < 0.01; ***p < 0.001; Supplementary Table 3).Dashed line = minimum threshold of discrimination (JND = 1) Page 7 of 10 102 than identical red models without spots.In fact, attack rates on the red-spotted models were as low as those for the emerald green models, which corresponds to the colour that allows adult males to cryptically blend into the upper rainforest canopy (Endler 1993;Gomez and Théry 2007).Importantly, we verified that avian predators likely see all the models in our study (Fig. 4B).Hence, predators were able to detect all colour models against the background on which they perched, suggesting that the white spots may have mediated a misclassification of the prey as a potentially inedible object.Moreover, it seems that red models are especially conspicuous to avian predators, as the JND values exceed such values associated with both emerald green models and white control models.If anything, this implies that red juveniles (with or without white spots) likely stand out to potential predators.Interestingly, the white control models received the lowest number of attacks.The birds do not have contact with plain white objects in the rainforest house.The avoidance of white models could reflect a general neophobia towards an unfamiliar new object, or that white colour is commonly perceived as a warning colour (Lecuelle et al. 2011;Cibulková et al. 2014).Together, our findings therefore suggest that i) red colouration with white spots confers antipredator benefits to juvenile Wallace's flying frogs and that ii) the effectiveness of this strategy is on par with crypsis camouflage strategies in adults.We are therefore seeing evidence for two distinct-but equally successful-antipredator defence strategies that unfold ontogenetically as frogs mature after metamorphosis.

A masquerade for antipredator defence
We hypothesize that juvenile frogs appear bright red with white spots because this colour pattern functions as a masquerade for antipredator defence.Specifically, we suspect that the combination of colour and its aesthetic appearance make young frogs closely resemble bird droppings.There are several reasons for this conclusion.The first is that white spots are a common characteristic of supposed masquerade strategies, in which individuals are thought to appear as animal droppings.Examples include orb web spiders (Cyclosa ginnaga), which decorate their webs with white shapes (Liu et al. 2014), and the moth Acronicta alni, which displays white body parts during its early larval stage (Valkonen et al. 2014).The second reason for our conclusion is that many birds and bats defecate faeces that are red with white spots, particularly fruit eating animals (Vander Wall et al. 2005) (Supplementary Fig. 1).It therefore makes sense that other birds would avoid eating food items that resemble such faeces, because the latter material would likely be unpalatable.
With these considerations in mind, it is worth pointing out that our study is the first experimental exploration of a bird/animal-dropping masquerade in anurans, although the validation in the field is missing.To this end, relatively few studies (Liu et al. 2014;Suzuki and Sakurai 2015;Yu et al. 2022a), rigorously test how conspicuous colour patterns function as animal dropping masquerade.We specifically tested the importance of the white spots on the frogs' conspicuous red body, and we find that these seemingly subtle white markings reduce the rate of attack from predators by roughly 50%.Thus, this innocuous white patterning associated with animal faeces acts as the main visual feature that turns an otherwise highly conspicuous individual into something perceived as unpalatable.
We suggest red juvenile colours with white spots might not rely on the predator's detection abilities (vision), but rather how it centrally processes its search image.In other words, the white spots may cause predators to interpret or classify the frog as an inedible item, as the spots are associated with animal faeces.The predator's search image may neglect certain prey or features to improve foraging efficiency and effectiveness.Such prey need not resemble their 'model' accurately to create an effective masquerade, since predators more often misclassify masquerading prey when the learning template is rare or when the masquerade is ubiquitous (Skelhorn and Ruxton 2010;Skelhorn 2015).For adults, green colouration likely helps them to match the background of their surroundings in the rainforest canopy, one of many other tactics for antipredator defence.For example, adult Wallace's tree frogs also have accessory skin flaps on arms and legs, large webbings between toes and a bent arm and leg position, which they use to glide (or 'fly') from the canopy to avoid being attacked by a predator (Emerson and Koehl 1990;Brodie et al. 1991).This behaviour also improves migration (Emerson and Koehl 1990) and is energetically less costly than hoping down the trees (Stewart 1985).
We recognize that other aspects of the colour phenotype may influence its ability to match the environment.For example, it is possible that the white spots of juveniles show some degree of UV reflectance to mirror animal droppings more closely; additionally adult frogs are able to dynamically change their green colouration depending on light conditions (Stückler et al. 2022).Differences in body size between juveniles and adults could also potentially enhance or limit the predation risk.We do not test these ideas in our current study, but it is something that could be looked at in future studies.

Ontogenetic shifts in antipredator strategies
Our study strongly suggests that Wallace's flying frogs experience a major developmental shift in antipredator camouflage strategy.Studies revealing such dynamism in antipredator strategy in frogs are scarce.Even if we look to other nocturnal tree frogs that inhabit the South and Southeast Asian rainforest, there is little evidence of masquerading as a major antipredator defence strategy.Indeed, species of the genus Theloderma sp. are often cryptic, except for T. asperum, which is commonly known as 'bird poop frog' (but no studies tested this hypothesis).This observations is consistent with broader work in anurans that finds that most nocturnal tree frogs similarly rely on crypsis as the primary way to hide from predators (Toledo and Haddad 2009;Rojas 2016).To this end, it is also worth highlighting that the ontogenetic transition in camouflage we discover is exceptionally uncommon.Most shifts in camouflage occur in the direction of crypsis to conspicuousness, with the latter state being closely associated with aposematism (Grant 2007;Valkonen et al. 2014).This specific order of events is likely the result of normal growth and its negative effect on crypsis (i.e. it is more difficult to stay hidden in plain sites when you are bigger).To our knowledge, there are very few species like the Wallace's tree frog, which transition from a conspicuous form of camouflage to a cryptic one.Examples only come from a species of cross frog (Oreophryne ezra), where juveniles are suggested to use a chemical defence strategy or Batesian mimicry before turning cryptic later in life (Bulbert et al. 2018).
Why would flying frogs change their camouflage strategy as they mature?None of the behavioural and morphological adaptations of the adults are present in the juvenile stage and only slowly develop during the first year of development.We assume that until flying frogs change their colouration to a dynamic cryptic green and develop morphological adaptations for gliding, they spend their early life stage in the forest understory.In this habitat, masquerading as bird droppings might be a reliable way of gaining protection from predators, as bird droppings are probably more common in the lower areas of rainforests.However, little information is available about where juvenile flying frogs live during their first year after metamorphosis once they leave the forest pools, and we assume the frog's habitat changes considerably during their transition to adulthood (Ready 2009).Certainly, adults are known to inhabit the canopy of primary forests (Inger and Stuebing 2005;Haas et al. 2022), even if they periodically use the understory for foraging and reproduction.A common feature of all life stages of the nocturnal flying frogs is an immotile sleeping behaviour on leaves during the day and an indistinct shape with appendages closely folded to the body, a behavioural trait that might further contribute to both forms of camouflage-masquerading and crypsis-during ontogeny.We suggest that ontogenetic shifts in morphology, behaviour and colouration might be driven by environmental and natural selection factors the species experiences in different habitats they utilize at different life stages.Future studies exploring the habitats and predators of juveniles and adults are necessary to investigate the main drivers of the ontogenetic colour change in the Wallace's flying frog.

Conclusions
Here, we suggest that the Wallace's flying frogs undergo a major ontogenetic shift in camouflage strategy-as juveniles they likely masquerade as red bird droppings by appearing bright red with white spots, but then they transition to an emerald green colour to background match with foliage high in the forest canopy.Importantly, we show that the white spots during this early life stage are a critical component to the camouflage strategy, turning what is a highly conspicuous body colour (bright red) into a disguise.There are few examples of ontogenetic changes to camouflage, particularly in the order we show (masquerade to crypsis).These findings therefore make the Wallace's flying frog a unique example of how animals might change their antipredator defences as they age and move to new or different environments.
Communicated by C. R GaborExtended author information available on the last page of the article 102 Page 2 of 10

Fig. 1
Fig. 1 Resting juvenile (A) and adult (B) Rhacophorus nigropalmatus individuals.Experimental set-up of the wax models (1-4), placed on leaves in the rainforest house of the Vienna Zoo: (1) red model, (2) red model with white spots, (3) green model and (4) unpainted control.Photo (B) provided by Kai Squires

Fig. 3
Fig. 3 Examples of observed bird attacks on wax models.Black arrows indicate attack sites