| Title: | Colour Palettes Inspired by Sea Slugs and Nudibranchs of Sydney |
|---|---|
| Description: | A collection of colour palettes derived from photographs of nudis and sea slugs I have encountered in intertidal zones and shallow rocky reefs around Sydney, Australia. Palettes can be used in base R or with 'ggplot2'. |
| Authors: | Niki Hubbard [aut, cre] |
| Maintainer: | Niki Hubbard <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.1.1 |
| Built: | 2026-05-15 22:03:29 UTC |
| Source: | https://github.com/cran/nudibranch |
Get a nudibranch colour palette
nudibranch_palette(name = NULL, n = NULL, type = c("discrete", "continuous"))nudibranch_palette(name = NULL, n = NULL, type = c("discrete", "continuous"))
name |
Name of the palette (e.g. "hypselodoris"). If NULL, prints all available palette names. |
n |
Number of colours to return. If NULL, returns all colours. |
type |
Either "discrete" or "continuous". |
A character vector of hex colour codes.nudibranch_palette. The palette name is stored as an attribute.
If name is NULL, returns a named list of all available palettes
invisibly.
nudibranch_palette("hypselodoris") nudibranch_palette("elysia", n = 3)nudibranch_palette("hypselodoris") nudibranch_palette("elysia", n = 3)
A named list of colour palettes inspired by nudibranchs and sea slugs photographed in Australian waters.
nudibranch_palettesnudibranch_palettes
An object of class list of length 12.
Print a nudibranch palette
## S3 method for class 'nudibranch_palette' print(x, ...)## S3 method for class 'nudibranch_palette' print(x, ...)
x |
A nudibranch_palette object |
... |
Additional arguments (ignored) |
Invisibly returns x. Called for its side effect of
printing the palette name and hex colour codes to the console.
ggplot2 colour scale using a nudibranch palette
scale_colour_nudibranch(name, n = NULL, type = "discrete", ...)scale_colour_nudibranch(name, n = NULL, type = "discrete", ...)
name |
Name of the palette (e.g. "hypselodoris") |
n |
Number of colours. If NULL, returns all colours in the palette. |
type |
Either "discrete" or "continuous" |
... |
Additional arguments passed to ggplot2 |
A ggplot2 scale object that can be added to a ggplot. Specifically
a ScaleDiscrete object created by
scale_colour_manual
ggplot2 fill scale using a nudibranch palette
scale_fill_nudibranch(name, n = NULL, type = "discrete", ...)scale_fill_nudibranch(name, n = NULL, type = "discrete", ...)
name |
Name of the palette (e.g. "hypselodoris") |
n |
Number of colours. If NULL, returns all colours in the palette. |
type |
Either "discrete" or "continuous" |
... |
Additional arguments passed to ggplot2 |
A ggplot2 scale object that can be added to a ggplot. Specifically
a ScaleDiscrete object created by
scale_fill_manual