Skip to main content
Dryad logo

Social Context Affects Camouflage in a Cryptic Fish Species


Encel, Stella; Ward, Ashley (2021), Social Context Affects Camouflage in a Cryptic Fish Species, Dryad, Dataset,


Crypsis, or the ability to avoid detection and/or recognition, is an important and widespread anti-predator strategy across the animal kingdom. Many animals are able to camouflage themselves by adapting their body colour to the local environment. In particular, rapid changes in body colour are often critical to the survival of cryptic prey which rely on evading detection by predators. This is especially pertinent for animals subject to spatiotemporal variability in their environment, as they must adapt to acute changes in their visual surroundings. However, which features of the local environment are most relevant is not well understood. In particular, little is known about how social context interacts with other environmental stimuli to influence crypsis. Here we use a common cryptic prey animal, the goby (Pseudogobius species 2) to examine how the presence and body colour of conspecifics influences the rate and extent to which gobies change colour. We find that solitary gobies change colour to match their background faster and to a greater extent than gobies in pairs. Further, we find that this relationship holds irrespective of the colour of nearby conspecifics. This study demonstrates the importance of social context in mediating colour change in cryptic animals.


Study Species and Holding Conditions

The goby Pseudogobius species 2 (part of a species complex undergoing taxonomic resolution) was used as the model species. Members of this genus are widely distributed throughout temperate, sub-tropical and tropical waters of the Indo- Pacific, occurring in shallow freshwater, marine and estuarine habitats47. The range of species 2 extends from southern Queensland to Victoria. It grows to a maximum body size of approximately 35mm. Due to the absence of any clear sexual dimorphism, adults of both sexes were used for experimentation. Like many fish species, this goby is capable of changing its body colour in response to variation in the physical environment. As is common among Gobiids, this species lacks a swim bladder and is adapted to a benthic lifestyle spent in close association with the substrate. This species is non-burrowing and demonstrates a characteristic saltatory pattern of locomotion, with relatively long periods of stillness punctuated by short hops forward. Fish were collected from a field site at Middle Creek, Narrabeen (33.718491°S, 151.270281°E) between August and October 2020 using large hand-held nets. Fish were captured in shallow waters approximately 5-20cm in depth. Permits for capture were obtained from the NSW Department of Primary Industries. Following capture, the fish were transported in oxygenated water to holding facilities at the University of Sydney. There, they were housed in tanks containing substrate composed of natural sand and variegated gravel, intended to represent a typical physical environment commonly encountered in the wild. They were fed daily with commercially available fish food (Nutrafin Tropical Flakes, Hagen Products, Germany) and their health was monitored prior to testing.

Experimental Design

Fish were exposed to one of two acclimation conditions (white or black background) and one of two test conditions (again, white or black background), for a total of four unique colour treatments. Additionally, fish were tested under one of two social treatments; a solitary treatment, in which the fish was tested alone, and a group treatment, in which the fish were tested in pairs.. In the group treatments fish were exposed to all four colour treatments as well as being either matched or mismatched to their partner, resulting in six unique social treatments for a total of ten treatments altogether (see Table 1). Each of the ten treatments were replicated six times to a total sample size of N = 60.

Test arenas were constructed from acrylic plastic and comprised a central square chamber and two removable side chambers with sliding door mechanisms allowing entry to the central chamber. The central arena measured 20 x 20 x 20 (L x W x H), while the side chambers measured 6 x 6 x 15 (L x W x H). There were two arenas, one black and one white, and four side chambers, two black and two white. The removable side chambers allowed pairing of any combination of colours (e.g. two black, two white, or one of each) with each colour of test arena. When side chambers were not matched to the colour of the central test arena, black or white duct tape was used to cover the part of the side chamber that faced into the central arena. The whole arena was placed inside a large plastic tub, and a frame was built around the entire apparatus. This frame was covered in white Corflute® in order to minimise external disturbance. Within the screens, four LED light batons (Cool white, 3300K) were placed, two at each end of the arena along the short axes of the tub. Lights were positioned so as to prevent direct illumination of the test arena and instead provide diffuse light.

Experimental Protocol

For each replicate, fish were haphazardly selected from the holding aquaria and transferred to the test apparatus in beakers. The fish were initially added to the side chambers (maximum one fish per side chamber) and allowed to acclimate for 15 minutes. This timing was based on pilot studies conducted prior to the experiment described here, which showed that most colour change occurs within 2-3 minutes, so this 15 minute acclimation was conservative. Once this period had elapsed, fish were released (simultaneously, in the case of pairs) into the central test arena by manually raising the sliding door of each side chamber. After the fish had exited the side chamber, the door was closed behind it. Fish were then allowed to move freely around the arena for a period of fifteen minutes. Each replicate was filmed using a Canon G1X camera positioned approximately 50cm above the central arena. The camera was set to take a sequence of still images, rather than to video, since the former allowed a higher resolution of 4352 x 3264 pixels per image. The frequency of images was approximately one image per half second in white tested treatments and approximately one image per 1.25 seconds in black tested treatments. This was due to the longer exposure period required in the darker (black) arena. No flash was used. After testing, fish were removed and transferred to a separate holding tank. No fish were reused.


From the sequence of images, we selected the first image following the entry of the fish to the arena. Subsequently, we selected images at thirty second intervals. Where this was not possible due to blurred images as a result of test subject movement, we selected the closest possible alternative in the series of images. Where a suitable image could not be selected within +/- 10 seconds of the scheduled sampling point, the data point was disregarded and the next image taken from the subsequent sampling point. This however was a rare occurrence, accounting for 5 data points out of 600 across all trials.

Adobe Photoshop was used to measure the RGB values of each fish and the background against which it was tested over time. The RGB colour model is an additive 3D model for the mathematical and digital representation of colour, based on a trichromatic visual system in which the visual spectrum is perceived as an additive combination of red, blue and green light. In this model, colours can be represented within a 3D plane by a set of coordinates with values ranging from 0-255. A standard 24-bit RGB colour display devotes 8 bits per pixel to each spectral channel (red, green, blue) in order to construct colour images. A binary encoded system (28 = 256) thus permits values from 0-255 for each spectral channel, with 255 representing full saturation. As such, in the RGB colour model (0,0,0) denotes pure black and (255,255,255) denotes pure white. This system allows the expression of millions of unique shades as cartesian points within the 3D RGB colour plane (2563 = 16,777,216). On this basis, the difference between any two colours can be quantified by calculating the Euclidean 3D distance between their RGB co-ordinates. In order to quantify the difference between a fish and its background, the magnetic lasso tool was used to trace the outline of the fish. After this, the fish could be cut and pasted onto a transparent background to allow the colour of the fish to be measured independent of its background. The eyedropper tool was then used to measure the average RGB values across the entire body of the fish. Similarly, the eyedropper tool was used to measure the RGB values of the background within one body length of the fish.

Together, these measures were used to calculate the 3D Euclidean distance between the colour of the fish and the background colour over time.

All analyses were conducted using R. Data were visually inspected using QQ plots and histograms. Outliers were identified using Cook’s distance. In total, three trials of the total sixty were removed due to anomalous colouration in the test subjects. Since there were differences in the ability of gobies to conform to black versus white backgrounds (see Supplementary Information), we conducted the analyses for these separately.  To test whether the presence (or absence) of conspecifics, and the background colour to which those conspecifics had been acclimated, affected the rate and extent of colour change of gobies, we used a linear mixed-effects model from the lme4 package for R. The response variable was the difference between gobies and their background. Fixed effects were treatments and time (as a continuous variable). For white acclimated gobies against a black background, we used treatments 3, 7 and 9 (see Table 1). For black acclimated gobies tested against a white background, we used treatments 2, 6 and 8. In each case, therefore, we compared gobies tested on their own, gobies tested in a pair (where the gobies used in the analysis were acclimated to a different colour than their partner) and gobies tested in a pair (where both were acclimated to the same colour). Using model selection methods (model.sel from the MuMIn package), we determined that the colour changing response of fish as a function of time followed a quadratic function, rather than a linear function. Finally, we specified trial as the random effect to account for multiple observations being taken within each trial.

Usage Notes

File names refer to acclimation and test backgrounds: 

BWTest indicates black-habituated fish tested against a white background 

BBTest indicates black-habituated fish tested against a black background 

WBTest indicates white-habituated fish tested against a black background

WWTest indicates white-habituated fish tested against a white background 


Australian Research Council, Award: DP190100660